Last Update:2004/11/04

Modify history
------Changes from the Beta1
* Added DrawTrack() function. Draw path information.
  The path isn't shown by default.


+ CAIBO3D
[Function] Constructor
[Return] void
[Description] Initialize internal objects and variables.
[Usage]    

CAIBO3D::CAIBO3D()


+ ~CAIBO3D
[Function] Destructor
[Return] void
[Description] Destruct internal objects and variables.
[Usage]    

CAIBO3D::~CAIBO3D()


+ Create3D
[Function] Create AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Create a child window at the specified rect area of the parent window, and show an AIBO 3D object in it.
[Usage]

int CAIBO3D::Create3D(
                      DWORD model,       // AIBO model ID        
                      char *path,        // Directory path name for graphics files (*.X file) 
                      HWND hWndParent,   // Parent window
                      RECT &rect,        // Rect area to display 3D (Local coordinates in parent window)
                      COLORREF bkColor,  // Background color
                      COLORREF fColor)   // Wire frame color


+ Show
[Function] Show/Hide AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Show/Hide AIBO 3D object
[Usage]    
int CAIBO3D::Show(
                  BOOL showF)  // Show flag


+ HomePosition
[Function] Move the AIBO 3D object to home position
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description]  Move AIBO 3D object to home position
[Usage]    
int CAIBO3D::HomePosition( void )


+ RotateBody
[Function] Rotate the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Rotate AIBO 3D object
[Usage]    
int CAIBO3D::RotateBody(
                            float pitch,  // X axis rotation (degrees)
                            float yaw,    // Y axis rotation (degrees)
                            float roll,   // Z axis rotation (degrees)
                            BOOL redraw)  // redraw flag


+ GetBodyAngle
[Function] Get body angle of the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Get body angle of AIBO 3D object
[Usage]    
int CAIBO3D::GetBodyAngle(
                              float *pitch,  // X axis rotation (degree) - stored
                              float *yaw,    // Y axis rotation (degree) - stored
                              float *roll)   // Z axis rotation (degree) - stored


+ Set3DPosture
[Function] Set posture of the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Set posture of the AIBO 3D object
[Usage]
void CAIBO3D::Set3DPosture(
                           int posture)  // posture ID(POSE_3D_NORMAL,..)


+ MoveAIBOAnimation
[Function] Start an animation of the AIBO 3D object moving (translation)
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Start/Stop the AIBO 3D object moving
[Usage]    
int CAIBO3D::MoveAIBOAnimation(
                               BOOL startF,  // TRUE: start  FALSE: stop
                               float speed)  // moving speed (per sec)


+ RotateAIBOAnimation
[Function] Rotation animation of the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Rotate AIBO 3D object 
[Usage]    
int CAIBO3D::RotateAIBOAnimation(
                                 float dYaw,  // rotate speed (degree/sec)
                                 BOOL now)    // TRUE: rotate now


+ PlayAnimation
[Function] Play animation of the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Play Animation of the AIBO 3D object
[Usage]    
int CAIBO3D::PlayAnimation(
                               int repeat,      // Number of repetitions (-1 is infinity)
                               BOOL bodyOnlyF,  // if TRUE, body rotates only
                               DWORD delay)     // delay time (msec) 


+ StopAnimation
[Function] Stop animation of the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Stop animation of the AIBO 3D object
[Usage]    
int CAIBO3D::StopAnimation()


+ ClearTrack
[Function] Delete path information
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Delete path information and clear the line
[Usage]    
int CAIBO3D::ClearTrack(
                        BOOL resetF)  // reset flag.  TRUE: back to 0 point 
                                      //            FALSE: keep current position

+ DrawTrack
[Function] Draw path information
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Draw path line or not.
[Usage]    
int CAIBO3D::DrawTrack(
                        BOOL drawF)  // draw flag.  TRUE: draw
                                     //             FALSE: not draw


+ RotateJoint
[Function] Rotate joint(s) of the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Rotate joint(s) of the AIBO 3D object
[Usage]    
int CAIBO3D::RotateJoint(
                         int jointID,  // jointID ; enum JOINTS_ID {} defined in CpcInfo.h
                         float angle,  // angle (degree)
                         BOOL redraw)  // redraw flag

int CAIBO3D::RotateJoint(
                         int *jointL,    // jointID list
                                         // retrieved by CCpcInfo::GetJointArray(int *joints)
                         float *angleL,  // angle list (degree)
                         int num,        // Number of elements in the list
                         BOOL redraw)    // redraw flag


+ SetColor
[Function] Set color of each joint of the AIBO 3D object
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Set color of each joint of the AIBO 3D object.
              The angle can be set also.
[Usage] 
int CAIBO3D::SetColor(
                          int joint,     // jointID ; enum JOINTS_ID {} defined in CpcInfo.h
                          COLORREF rgb,  // color
                          BOOL redrawF)  // redraw flag
int CAIBO3D::SetColor(
                          int joint,     // jointID ; enum JOINTS_ID {} defined in CpcInfo.h
                          COLORREF rgb,  // color
                          float angle,   // angle(degree)
                          BOOL redrawF)  // redraw flag


+ GetColor
[Function] Get color of each joint from the AIBO 3D object
[Return] COLORREF
[Description] Get color of each joint from the AIBO 3D object
[Usage]    
COLORREF CAIBO3D::GetColor(
                           int joint)  // jointID ; enum JOINTS_ID {} defined in CpcInfo.h


+ MoveCamera
[Function] Move the camera
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Move the camera
[Usage]    
int CAIBO3D::MoveCamera(
                        float x,
                        float y)


+ ZoomCamera
[Function] Zoom the camera
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Zoom the camera
[Usage]    
int CAIBO3D::ZoomCamera(
                        float zoom)


+ RotateCamera
[Function] Rotate the camera
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Rotate the camera
[Usage]    
int CAIBO3D::RotateCamera(
                          float pitch,  // X axis rotation (degree)
                          float yaw)    // Y axis rotation (degree)


+ GetCameraPos
[Function] Get camera position
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Get camera position
[Usage]    
int CAIBO3D::GetCameraPos(
                          float *x,
                          float *y,
                          float *z)


+ GetCameraAngle
[Function] Get camera rotation angle
[Return] Success : AIBO3D_NOERROR  Fail : Error code (AIBO3D.h)
[Description] Get camera rotation angle
[Usage]    
int CAIBO3D::GetCameraAngle(
                            float *pitch, // X axis rotation (degree)
                            float *yaw)   // Y axis rotation (degree)


+ SetLight
[Function] Set light color
[Return] void
[Description] Set light color
[Usage]    
void    CAIBO3D::SetLight(
                          COLORREF directLight,  // Directional light color
                          COLORREF pointLight,   // Point light color
                          COLORREF ambient)      // Ambient light color


+ SetFloorTexture
[Function] Set floor texture
[Return] void
[Description] Set floor texture
[Usage]    
void    CAIBO3D::SetFloorTexture(
                                 char* strFile)  // bitmap file name
void    CAIBO3D::SetFloorTexture(
                                 int nID)  // bitmap resource ID


+ SetBackTexture
[Function] Set background texture
[Return] void
[Description] Set background texture
[Usage]    
void    CAIBO3D::SetBackTexture(
                                char* strFile)  //  bitmap file name
void    CAIBO3D::SetBackTexture(
                                int nID)  //  bitmap resource ID


+ DeleteFloorTexture
[Function] Delete floor texture
[Return] void
[Description] Delete floor texture
[Usage]    
void    CAIBO3D::DeleteFloorTexture()


+ DeleteBackTexture
[Function] Delete background texture
[Return] void
[Description] Delete background texture
[Usage]    
void    CAIBO3D::DeleteBackTexture()


+ SetLocalRotationX
[Function] Set X axis rotation (degree) of AIBO 3D object using local coordinates
[Return] void
[Description] Set X axis rotation (degree) of AIBO 3D object using local coordinates
[Usage]    
void    CAIBO3D::SetLocalRotationX(
                                   float fX,     // X axis rotation (degrees)
                                   BOOL redraw)  // Redraw flag


+ SetLocalRotationY
[Function] Set Y axis rotation (degree) of AIBO 3D object using local coordinates
[Return] void
[Description] Set Y axis rotation (degree) of AIBO 3D object using local coordinates
[Usage]    
void    CAIBO3D::SetLocalRotationY(
                                   float fY,     // Y axis rotation (degrees)
                                   BOOL redraw)  // Redraw flag


+ SetLocalRotationZ
[Function] Set Z axis rotation (degree) of AIBO 3D object using local coordinates
[Return] void
[Description] Set Z axis rotation (degree) of AIBO 3D object using local coordinates
[Usage]    
void    CAIBO3D::SetLocalRotationZ(
                                   float fZ,     // Z axis rotation (degrees)
                                   BOOL redraw)  // Redraw flag


+ SetLocalRotation
[Function] Set X,Y,Z axis rotation (degree) of AIBO 3D object using local coordinates
[Return] void
[Description] Set X,Y,Z axis rotation (degree) of AIBO 3D object using local coordinates
[Usage]    
void    CAIBO3D::SetLocalRotation(
                                  float fX,     // X axis rotation (degrees)
                                  float fY,     // Y axis rotation (degrees)
                                  float fZ,     // Z axis rotation (degrees)
                                  BOOL redraw)  // Redraw flag


+ SetLocalTransfer
[Function] Set X,Y,Z axis parallel translation of AIBO 3D object using local coordinates
[Return] void
[Description] Set X,Y,Z axis parallel translation of AIBO 3D object using local coordinates
[Usage]    
void    CAIBO3D::SetLocalTransfer(
                                  float fX,     // X axis parallel translation
                                  float fY,     // Y axis parallel translation
                                  float fZ,     // Z axis parallel translation
                                  BOOL redraw)  // Redraw flag


+ GetLocalRotation
[Function] Get X,Y,Z axis rotation (degree) of AIBO 3D object using local coordinates
[Return] void
[Description] Get X,Y,Z axis rotation (degree) of AIBO 3D object using local coordinates
[Usage]    
void    CAIBO3D::GetLocalRotation(
                                  float* pX,  // X shaft rotation (degrees) to store into
                                  float* pY,  // Y shaft rotation (degrees) to store into
                                  float* pZ)  // Z shaft rotation (degrees) to store into


+ GetLocalTransfer
[Function] Get X,Y,Z axis parallel translation of AIBO 3D object by local coordinate
[Return] void
[Description] Get X,Y,Z axis parallel translation of AIBO 3D object by local coordinate
[Usage]    
void    CAIBO3D::GetLocalTransfer(
                                  float* pX,  // X axis parallel translation to store into
                                  float* pY,  // Y axis parallel translation to store into
                                  float* pZ)  // Z axis parallel translation to store into


+ ShowCopyModel
[Function] Show/hide a duplicate model of the AIBO 3D object
[Return] void
[Description] Show/hide a duplicate model of the AIBO 3D object
[Usage]    
void    CAIBO3D::ShowCopyModel(
                               int nIdx,     // Copy model ID(0 --- MAX_COPYMODEL-1)
                               BOOL isShow,  // Show/hidden
                               BOOL redraw)  // Redraw


+ IsShowCopyModel
[Function] Determine if the duplicate model of the AIBO 3D object is shown or hidden
[Return] Show : TRUE     Hidden : FALSE
[Description] Determine if the duplicate model of the AIBO 3D object is shown or hidden
[Usage]    
BOOL    CAIBO3D::IsShowCopyModel(
                                 int nIdx)  // Copy model ID(0 --- MAX_COPYMODEL-1)


+ SetCopyModelRotationX
[Function] Set X axis rotation (degrees) of the AIBO 3D object's duplicate model using local coordinates
[Return] void
[Description] Set X axis rotation (degrees) of the AIBO 3D object's duplicate model using local coordinates
[Usage]    
void    CAIBO3D::SetCopyModelRotationX(
                                       int nIdx,     // Copy ModelID(0 --- MAX_COPYMODEL-1)
                                       float fX,     // X axis rotation (degrees)
                                       BOOL redraw)  // Redraw flag


+ SetCopyModelRotationY
[Function] Set Y axis rotation (degrees) of the AIBO 3D object's duplicate model using local coordinates
[Return] void
[Description] Set Y axis rotation (degrees) of the AIBO 3D object's duplicate model using local coordinates
[Usage]    
void    CAIBO3D::SetCopyModelRotationY(
                                       int nIdx,     // Copy ModelID(0 --- MAX_COPYMODEL-1)
                                       float fY,     // Y axis rotation (degrees)
                                       BOOL redraw)  // Redraw flag


+ SetCopyModelRotationZ
[Function] Set Z axis rotation (degrees) of the AIBO 3D object's duplicate model using local coordinates
[Return] void
[Description] Set Z axis rotation (degrees) of the AIBO 3D object's duplicate model using local coordinates
[Usage]    
void    CAIBO3D::SetCopyModelRotationZ(
                                       int nIdx,     // Copy ModelID(0 --- MAX_COPYMODEL-1)
                                       float fZ,     // Z axis rotation (degrees)
                                       BOOL redraw)  // Redraw flag


+ SetCopyModelRotation
[Function] Set X,Y,Z axis rotation (degree) of the AIBO 3D object's duplicate model using local coordinates
[Return] void
[Description] Set X,Y,Z axis rotation (degree) of the AIBO 3D object's duplicate model using local coordinates
[Usage]    
void    CAIBO3D::SetCopyModelRotation(
                                      int nIdx,     // Copy ModelID(0 --- MAX_COPYMODEL-1)
                                      float fX,     // X shaft rotation (degree)
                                      float fY,     // Y shaft rotation (degree)
                                      float fZ,     // Z shaft rotation (degree)
                                      BOOL redraw)  // Redraw flag


+ SetCopyModelTransfer
[Function] Set X,Y,Z axis parallel translation of the AIBO 3D object's duplicate model using local coordinates
[Return] void
[Description] Set X,Y,Z axis parallel translation of the AIBO 3D object's duplicate model using local coordinates
[Usage]    
void    CAIBO3D::SetCopyModelTransfer(
                                      int nIdx,     // Copy ModelID(0 --- MAX_COPYMODEL-1)
                                      float fX,     // X axis parallel translation
                                      float fY,     // Y axis parallel translation
                                      float fZ,     // Z axis parallel translation
                                      BOOL redraw)  // Redraw flag


+ GetCopyModelRotation
[Function] Get X,Y,Z axis rotation (degree) of the AIBO 3D object's duplicate model using local coordinates
[Return] void
[Description] Get X,Y,Z axis rotation (degree) of the AIBO 3D object's duplicate model using local coordinates
[Usage]    
void    CAIBO3D::GetCopyModelRotation(
                                      int nIdx,   // Copy ModelID(0 --- MAX_COPYMODEL-1)
                                      float* pX,  // X axis rotation (degrees) to store into
                                      float* pY,  // Y axis rotation (degrees) to store into
                                      float* pZ)  // Z axis rotation (degrees) to store into


+ GetCopyModelTransfer
[Function] Get X,Y,Z axis parallel translation of the AIBO 3D object's duplicate model using local coordinates
[Return] void
[Description] Get X,Y,Z axis parallel translation of the AIBO 3D object's duplicate model using local coordinates
[Usage]    
void    CAIBO3D::GetCopyModelTransfer(
                                      int nIdx,   // Copy ModelID(0 --- MAX_COPYMODEL-1)
                                      float* pX,  // X axis parallel translation to store into
                                      float* pY,  // Y axis parallel translation to store into
                                      float* pZ)  // Z axis parallel translation to store into


+ IsShowDrawText2D
[Function] Determine if 2D text is shown or hidden
[Return] Show : TRUE     Hidden : FALSE
[Description] Determine if 2D text is shown or hidden
[Usage]    
BOOL    CAIBO3D::IsShowDrawText2D()


+ ShowDrawText2D
[Function] Show/hide 2D text
[Return] void
[Description] Show/hide 2D text
[Usage]    
void    CAIBO3D::ShowDrawText2D(
                                BOOL isShow)  // TRUE: shown, FALSE: hidden


+ CreateDrawText2DSurface
[Function] Create a surface for drawing 2D text
[Return] Success : TRUE  Fail : FALSE
[Description] Create a surface for drawing 2D text
[Usage]    
BOOL    CAIBO3D::CreateDrawText2DSurface(
                                         int nWidth,   // Surface width
                                         int nHeight)  // Surface height


+ SetDrawText2DString
[Function] Set string to draw 2D text
[Return] void
[Description] Set string to draw 2D text
[Usage]    
void    CAIBO3D::SetDrawText2DString(
                                     char* strText)  // string


+ SetDrawText2DFont
[Function] Set font to draw 2D text
[Return] void
[Description] Set font to draw 2D text
       Don't manually delete the font object; an internal process will delete the font
[Usage]
void    CAIBO3D::SetDrawText2DFont(
                                   HFONT hFont)  // font


+ SetDrawText2DColor
[Function] Set color to draw 2D text
[Return] void
[Description] Set color to draw 2D text
[Usage]    
void    CAIBO3D::SetDrawText2DColor(
                                    COLORREF color)  // color


+ SetDrawText2DBackColor
[Function] Set background color to draw 2D text
[Return] void
[Description] Set background color to draw 2D text
         This color is ignored when background transparency is ON
[Usage]
void    CAIBO3D::SetDrawText2DBackColor(
                                        COLORREF color)  // background color


+ SetDrawText2DBackTransparent
[Function] Set background transparency ON/OFF for 2D text
[Return] void
[Description] Set background transparency ON/OFF for 2D text
[Usage]    
void    CAIBO3D::SetDrawText2DBackTransparent(
                                              BOOL isTransparent)  // transparent flag 


+ SetDrawText2DDrawArea
[Function] Set drawing area to draw 2D text
[Return] void
[Description] Set drawing area to draw 2D text
[Usage]    
void    CAIBO3D::SetDrawText2DDrawArea(
                                       int nSx,      // Drawing area Top left X coordinate
                                       int nSy,      // Drawing area Top left Y coordinate
                                       int nWidth,   // Drawing area width
                                       int nHeight)  // Drawing area height


+ IsShowDrawText3D
[Function] Determine if 3D text is shown or hidden
[Return] Show : TRUE     Hidden : FALSE
[Description] Determine if 3D text is shown or hidden
[Usage]    
BOOL    CAIBO3D::IsShowDrawText3D()


+ ShowDrawText3D
[Function] Show/hide 3D text
[Return] void
[Description] Show/hide 3D text
[Usage]    
void    CAIBO3D::ShowDrawText3D(
                                BOOL isShow)  // TRUE: shown, FALSE: hidden


+ CreateDrawText3DSurface
[Function] Create surface for drawing 3D text
[Return] Success : TRUE  Fail : FALSE
[Description] Create surface for drawing 3D text
[Usage]    
BOOL    CAIBO3D::CreateDrawText3DSurface(
                                         int nWidth,   // Surface width
                                         int nHeight)  // Surface height


+ SetDrawText3DString
[Function] Set string to draw 3D text
[Return] void
[Description] Set string to draw 3D text
[Usage]    
void    CAIBO3D::SetDrawText3DString(
                                     char* strText)  // string


+ SetDrawText3DFont
[Function] Set font to draw 3D text
[Return] void
[Description] Set font to draw 3D text
       Don't manually delete the font object; an internal process will delete the font

[Usage]
void    CAIBO3D::SetDrawText3DFont(
                                   HFONT hFont)  // font


+ SetDrawText3DColor
[Function] Set color to draw 3D text
[Return] void
[Description] Set color to draw 3D text
[Usage]    
void    CAIBO3D::SetDrawText3DColor(
                                    COLORREF color)  // color


+ SetDrawText3DBackColor
[Function]  Set background color to draw 3D text
[Return] void
[Description]  Set background color to draw 3D text
        This color is ignored when background transparency is ON
[Usage]
void    CAIBO3D::SetDrawText3DBackColor(
                                        COLORREF color)  // background color


+ SetDrawText3DBackTransparent
[Function] Set background transparency ON/OFF to draw 3D text
[Return] void
[Description] Set background transparency ON/OFF to draw 3D text
[Usage]    
void    CAIBO3D::SetDrawText3DBackTransparent(
                                              BOOL isTransparent)  //transparent flag 


+ SetDrawText3DBasePoint
[Function] Set base point to draw 3D text
[Return] void
[Description] Set base point to draw 3D text
[Usage]    
void    CAIBO3D::SetDrawText3DBasePoint(
                                        float fX,  // Base point X
                                        float fY,  // Base point Y
                                        float fZ)  // Base point Z


+ SetDrawText3DDrawArea
[Function] Set drawing area to draw 3D text
[Return] void
[Description] Set drawing area to draw 3D text
[Usage]    
void    CAIBO3D::SetDrawText3DDrawArea(
                                       float fBaseX,   // Base point X
                                       float fBaseY,   // Base point Y
                                       float fWidth,   // Width
                                       float fHeight)  // Height


+ GetVersion
[Function] Get version information
[Return] void
[Description] Get version information (Currently, does nothing)
[Usage]    
void CAIBO3D::GetVersion(
                         char *verString)  // Version string


