CCD_Object Class Reference
A Object class used in
CCD.
More...
#include <CCD_Object.h>
List of all members.
|
Public Member Functions |
int | getID () const |
void | setID (int val) |
void | beginObject (UINT numFrame, UINT numVtx, UINT numTri, UINT objType) |
void | endObject (void) |
void | setVtx (UINT frame, UINT index, Vec3f pos) |
void | setCurVtx (UINT index, Vec3f pos) |
void | setCurVtx (Vec3f *vtxs) |
void | swapVtxs_Cur_Prev (void) |
void | setPrevVtx (UINT index, Vec3f pos) |
void | setPrevVtx (Vec3f *vtxs) |
void | setTri (UINT index, UINT a, UINT b, UINT c) |
void | setTransformationMatrix (mat4f transMat) |
bool | setProperty (UINT prop, UINT value) |
UINT | getProperty (UINT prop) |
void | printObjectInformation (void) |
void | nextFrame (void) |
void | setOutput (CCD_Output *output) |
void | visualizeBVH (int level) |
void | visualizeObject (void) |
Friends |
class | CCD |
class | BVH_Node |
class | BVH |
Detailed Description
A Object class used in
CCD.
A object class. It maintain information of a object.
- Author:
- Duksu Kim ( bluekds@tclab.kaist.ac.kr )
SGLAB, KAIST ( http://sglab.kaist.ac.kr )
- Version:
- 0.5
Member Function Documentation
void CCD_Object::beginObject |
( |
UINT |
numFrame, |
|
|
UINT |
numVtx, |
|
|
UINT |
numTri, |
|
|
UINT |
objType | |
|
) |
| | |
Set the basic property of the objects.
- Parameters:
-
| numFrame | the number of frames |
| numVtx | the number of vertices |
| numTri | the number of triangles |
| objType | a type of the object ( CCD_OBJECT_TYPE_STATIC, CCD_OBJECT_TYPE_DEFORMABLE ) |
void CCD_Object::endObject |
( |
void |
|
) |
|
Assemble information of object.
It should be called after inputing all information of vetices and triangles.
int CCD_Object::getID |
( |
|
) |
const [inline] |
Set object ID
- Returns:
- Object ID
UINT CCD_Object::getProperty |
( |
UINT |
prop |
) |
|
Set property
- Parameters:
-
| prop | The property what want to know ( CCD_PROPERTY_[the name of property] - see the header file "CCD_Object.h" ) |
- Returns:
- The value of the property
0 : fail to get the property
void CCD_Object::nextFrame |
( |
void |
|
) |
|
Move to next frame if this object has information of next frame.
void CCD_Object::printObjectInformation |
( |
void |
|
) |
|
Show information of the object.
Information includes
1. Type and state 2. The number of vertex, triangles, and frame
3. Transformation matrix
4. Memory usage
void CCD_Object::setCurVtx |
( |
Vec3f * |
vtxs |
) |
|
Set current position of vertexes
- Parameters:
-
void CCD_Object::setCurVtx |
( |
UINT |
index, |
|
|
Vec3f |
pos | |
|
) |
| | |
Set current position of a indexed vertex
- Parameters:
-
| index | the index of vertex |
| pos | the position of the vertex |
void CCD_Object::setID |
( |
int |
val |
) |
[inline] |
Get object ID
- Parameters:
-
void CCD_Object::setOutput |
( |
CCD_Output * |
output |
) |
[inline] |
Set the CCD_Ouput instance that is used for collect the result of CCD.
- Parameters:
-
void CCD_Object::setPrevVtx |
( |
Vec3f * |
vtxs |
) |
|
Set previous position of vertexes
- Parameters:
-
void CCD_Object::setPrevVtx |
( |
UINT |
index, |
|
|
Vec3f |
pos | |
|
) |
| | |
Set previous position of a indexed vertex
- Parameters:
-
| index | the index of vertex |
| pos | the position of the vertex |
bool CCD_Object::setProperty |
( |
UINT |
prop, |
|
|
UINT |
value | |
|
) |
| | |
Set property
- Parameters:
-
| prop | The property which will be set ( CCD_PROPERTY_[the name of property] ) |
| value | The value will be assigned |
- Returns:
- true : success, false : fail
void CCD_Object::setTransformationMatrix |
( |
mat4f |
transMat |
) |
|
Set the transformation matrix
- Parameters:
-
| transMat | Transformation matrix applying to the object |
void CCD_Object::setTri |
( |
UINT |
index, |
|
|
UINT |
a, |
|
|
UINT |
b, |
|
|
UINT |
c | |
|
) |
| | |
Set three vertex's indexes composing the indexed triangle
- Parameters:
-
| index | the index of the triangle |
| a | the first vertex |
| b | the second vertex |
| c | the third vertex |
void CCD_Object::setVtx |
( |
UINT |
frame, |
|
|
UINT |
index, |
|
|
Vec3f |
pos | |
|
) |
| | |
Set position of a indexed vertex
- Parameters:
-
| frame | the index of frame including the vertex that will be set |
| index | the index of vertex |
| pos | the position of the vertex |
void CCD_Object::swapVtxs_Cur_Prev |
( |
void |
|
) |
|
Copy current vertexes to previous vertexes
void CCD_Object::visualizeBVH |
( |
int |
level |
) |
[inline] |
If you want to visualize BVHs, you can call this method at the display part of openGL
- Parameters:
-
| level | The BV level which you want to see |
void CCD_Object::visualizeObject |
( |
void |
|
) |
|
If you want to visualize this object, you can call this method at the display part of openGL
The documentation for this class was generated from the following files:
- C:/Important Data/Office/SW_CCD/SW_CCD/CCD_Object.h
- C:/Important Data/Office/SW_CCD/SW_CCD/CCD_Object.cpp