#include <Object.h>


Public Member Functions | |
| Object () | |
| ~Object () | |
| void | clean () |
| void | setSegment (int segment_id) |
| cvrIndex | addPoint (const XYZ &xyz_in) |
| single XYZ point addition | |
| void | addPoint (cvrIndex pointNum, const XYZ &xyz_in) |
| single XYZ point addition with specified point reference | |
| void | calcBB () |
| calculate the bounds for this object, subsequent calls cached | |
| void | getBoundingBox (XYZ &bbMin, XYZ &bbMax) |
| fetch the bounds for this object | |
| void | setPatch (cvrIndex faceNum, bool isPatchState=true) |
| void | setWeight (cvrIndex pointNum, float weightVal) |
| bool | hasPatches () |
| void | generatePatches () |
| cvrIndex | addFace () |
| appends a new face | |
| void | addFace (cvrIndex faceNum) |
| appends a new face, specific facenum | |
| int | addFacePoint (cvrIndex pointNum) |
| adds a point reference to the last created face | |
| void | addFacePoint (cvrIndex faceNum, cvrIndex pointNum) |
| adds a point reference to a specific face reference | |
| void | addFacePoint (cvrIndex faceNum, const XYZ &xyz_in) |
| adds a point & binds reference to a specific face reference | |
| void | addFacePoint (const XYZ &xyz_in) |
| adds a point & binds reference to last face added | |
| int | addFacePoint (cvrIndex pointNum, RGB &rgb_val) |
| adds a point reference to the last created face | |
| void | addFacePoint (cvrIndex faceNum, cvrIndex pointNum, RGB &rgb_val) |
| adds a point reference to a specific face reference + color | |
| void | addFacePoint (cvrIndex faceNum, const XYZ &xyz_in, RGB &rgb_val) |
| adds a point & binds reference to a specific face reference + color | |
| void | addFacePoint (const XYZ &xyz_in, RGB &rgb_val) |
| adds a point & binds reference to last face added | |
| cvrIndex | hasPoint (const XYZ &point_compare) |
| If point exists return point number, else -1. | |
| void | setFaceSegment (cvrIndex faceNum, int segment_id) |
| void | bindFaceMaterial () |
| binds the last material created using Material::createMaterial to the last created face | |
| void | bindFaceMaterial (cvrIndex matNum) |
| binds the last material created using Material::createMaterial to a specific face reference | |
| void | bindFaceMaterial (cvrIndex faceNum, cvrIndex matNum) |
| binds a specific material reference to a specific face reference | |
| void | calcNormals () |
| calculates the face normals for all faces and points | |
| void | reCalcNormals () |
| re-calculates face and smooth point normals using cached material smoothing reference | |
| void | cloneStructure (Object &obj) |
| create this object's point/face structure from that of another | |
| void | cloneObject (Object &obj) |
| fully clone / add an object into this object (surface params & materials included) | |
| void | buildRefList () |
| build mat_reflist | |
| void | calcGroupSizes () |
| void | cache (bool cache_state_in, bool dynamic_cache=false, bool vertex_buffer=true) |
| set cache state, used for optimizing rendering performance, if point/normal modification/update needed set dynamic_buffer to true | |
| void | fullCopyCache (bool doPoints=true, bool doNormals=true) |
| do a full copy cache update, points? normals? | |
| void | updatePointCache (cvrIndex pointNum) |
| Initiate a cache update for pointNum. | |
| void | updatePointNormalCache (cvrIndex pointNum, XYZ &normal_val) |
| Set normal value and initiate a cache update for pointNum. | |
| void | updatePointNormalCache (cvrIndex pointNum, int subPoint, XYZ &normal_val) |
| Set normal value and initiate a cache update for pointNum (subpoint for smoothed surfaces). | |
| void | updateColorCache () |
| copy bind_colors to the cache_colors (and upload if need be) | |
| void | clearFace (cvrIndex faceNum) |
| clear face faceNum from the object | |
| void | copyFace (cvrIndex srcFaceNum, cvrIndex dstFaceNum) |
| duplicate face srcFaceNum to dstFaceNum | |
| void | triangulate () |
| convert any polygons (4+ points) into triangles | |
| void | openBuffer (bool fullCopy=false) |
| void | closeBuffer (bool fullCopy=false) |
Public Attributes | |
| std::vector< XYZ * > | points |
| points vector stores the points for this object | |
| std::vector< Face * > | faces |
| faces stores the Faces for this object | |
| std::vector< bool > | isPatch |
| std::vector< cvrIndex > | patches |
| std::vector< float > | weights |
| XYZ | bbMin |
| cached object bounds | |
| XYZ | bbMax |
| bool | cache_state |
| cache state | |
| bool | tangent_binormal_state |
| if true we've calculated the binormals and tangents for the faces and they will be included in the cache data | |
| bool | buffer_state |
| is object buffered on card? | |
| char * | open_buffer |
| if set, there's currently a buffer open for writing and this is it's address | |
| bool | hasColorMap |
| int | numSegments |
| int | activeSegment |
| unsigned long | pointCacheOffset |
| unsigned long | normalCacheOffset |
| unsigned long | uvCacheOffset |
| unsigned long | colorMapOffset |
| va_rgb * | dynamic_colors |
| BITSET * | segmentMask |
| va_block | cache_data |
| map< cvrIndex, map< unsigned int, map< cvrIndex, va_ref, ltindex >, ltuint >, ltindex > | mat_cache_data |
| map< cvrIndex, set< cvrIndex > > | vertex_cacheref |
| std::vector< std::vector < std::vector< smoothingPair > > > | point_smoothCache |
| map< cvrIndex, map< unsigned int, map< unsigned short, set < cvrIndex >, ltushort > , ltuint >, ltindex > | mat_reflist |
| mat_reflist stores material/face reference lists for storing face pointers by materials to avoid heavy texture context switching | |
Private Member Functions | |
| bool | ensurePoints (cvrIndex pointNum) |
| used internally to make sure we have enough points for a given request | |
| bool | ensureFaces (cvrIndex faceNum) |
| used internally to make sure we have enough faces for a given request | |
| void | reflistAdd (cvrIndex faceNum) |
| used internally for face/material reference switching | |
| Object::Object | ( | ) |
| Object::~Object | ( | ) |

| bool Object::ensurePoints | ( | cvrIndex | pointNum | ) | [private] |
used internally to make sure we have enough points for a given request
| bool Object::ensureFaces | ( | cvrIndex | faceNum | ) | [private] |
used internally to make sure we have enough faces for a given request
| void Object::reflistAdd | ( | cvrIndex | faceNum | ) | [private] |
used internally for face/material reference switching
| void Object::clean | ( | ) |

| void Object::setSegment | ( | int | segment_id | ) |
| void Object::addPoint | ( | cvrIndex | pointNum, | |
| const XYZ & | xyz_in | |||
| ) |
| void Object::calcBB | ( | ) |
calculate the bounds for this object, subsequent calls cached

| void Object::setPatch | ( | cvrIndex | faceNum, | |
| bool | isPatchState = true | |||
| ) |
| void Object::setWeight | ( | cvrIndex | pointNum, | |
| float | weightVal | |||
| ) |
| bool Object::hasPatches | ( | ) | [inline] |
| void Object::generatePatches | ( | ) |
| cvrIndex Object::addFace | ( | ) |
appends a new face

| void Object::addFace | ( | cvrIndex | faceNum | ) |
appends a new face, specific facenum

| int Object::addFacePoint | ( | cvrIndex | pointNum | ) |
adds a point reference to the last created face
| void Object::addFacePoint | ( | cvrIndex | faceNum, | |
| cvrIndex | pointNum | |||
| ) |
adds a point reference to a specific face reference

| void Object::addFacePoint | ( | cvrIndex | faceNum, | |
| const XYZ & | xyz_in | |||
| ) |
adds a point & binds reference to a specific face reference
| void Object::addFacePoint | ( | const XYZ & | xyz_in | ) |
adds a point & binds reference to last face added
| int Object::addFacePoint | ( | cvrIndex | pointNum, | |
| RGB & | rgb_val | |||
| ) |
adds a point reference to the last created face

| void Object::addFacePoint | ( | cvrIndex | faceNum, | |
| cvrIndex | pointNum, | |||
| RGB & | rgb_val | |||
| ) |
adds a point reference to a specific face reference + color

adds a point & binds reference to a specific face reference + color
adds a point & binds reference to last face added
| cvrIndex Object::hasPoint | ( | const XYZ & | point_compare | ) |
If point exists return point number, else -1.
| void Object::setFaceSegment | ( | cvrIndex | faceNum, | |
| int | segment_id | |||
| ) |
| void Object::bindFaceMaterial | ( | ) |
binds the last material created using Material::createMaterial to the last created face
| void Object::bindFaceMaterial | ( | cvrIndex | matNum | ) |
binds the last material created using Material::createMaterial to a specific face reference

| void Object::bindFaceMaterial | ( | cvrIndex | faceNum, | |
| cvrIndex | matNum | |||
| ) |
binds a specific material reference to a specific face reference

| void Object::calcNormals | ( | ) |
calculates the face normals for all faces and points
| void Object::reCalcNormals | ( | ) |
re-calculates face and smooth point normals using cached material smoothing reference
| void Object::cloneStructure | ( | Object & | obj | ) |
create this object's point/face structure from that of another

| void Object::cloneObject | ( | Object & | obj | ) |
fully clone / add an object into this object (surface params & materials included)

| void Object::buildRefList | ( | ) |
build mat_reflist

| void Object::calcGroupSizes | ( | ) |
| void Object::cache | ( | bool | cache_state_in, | |
| bool | dynamic_cache = false, |
|||
| bool | vertex_buffer = true | |||
| ) |
set cache state, used for optimizing rendering performance, if point/normal modification/update needed set dynamic_buffer to true
element cache uses a second buffer

| void Object::fullCopyCache | ( | bool | doPoints = true, |
|
| bool | doNormals = true | |||
| ) |
do a full copy cache update, points? normals?
| void Object::updatePointCache | ( | cvrIndex | pointNum | ) |
Initiate a cache update for pointNum.
| void Object::updatePointNormalCache | ( | cvrIndex | pointNum, | |
| XYZ & | normal_val | |||
| ) |
Set normal value and initiate a cache update for pointNum.
| void Object::updatePointNormalCache | ( | cvrIndex | pointNum, | |
| int | subPoint, | |||
| XYZ & | normal_val | |||
| ) |
Set normal value and initiate a cache update for pointNum (subpoint for smoothed surfaces).
| void Object::updateColorCache | ( | ) |
copy bind_colors to the cache_colors (and upload if need be)
| void Object::clearFace | ( | cvrIndex | faceNum | ) |
clear face faceNum from the object
| void Object::copyFace | ( | cvrIndex | srcFaceNum, | |
| cvrIndex | dstFaceNum | |||
| ) |
duplicate face srcFaceNum to dstFaceNum

| void Object::triangulate | ( | ) |
convert any polygons (4+ points) into triangles

| void Object::openBuffer | ( | bool | fullCopy = false |
) |
| void Object::closeBuffer | ( | bool | fullCopy = false |
) |

| std::vector<XYZ *> Object::points |
points vector stores the points for this object
| std::vector<Face *> Object::faces |
faces stores the Faces for this object
| std::vector<bool> Object::isPatch |
| std::vector<cvrIndex> Object::patches |
| std::vector<float> Object::weights |
cached object bounds
| bool Object::cache_state |
cache state
if true we've calculated the binormals and tangents for the faces and they will be included in the cache data
| bool Object::buffer_state |
is object buffered on card?
| char* Object::open_buffer |
if set, there's currently a buffer open for writing and this is it's address
| bool Object::hasColorMap |
| unsigned long Object::pointCacheOffset |
| unsigned long Object::normalCacheOffset |
| unsigned long Object::uvCacheOffset |
| unsigned long Object::colorMapOffset |
| map<cvrIndex, map<unsigned int, map<cvrIndex, va_ref, ltindex>, ltuint>, ltindex> Object::mat_cache_data |
| map<cvrIndex, set<cvrIndex> > Object::vertex_cacheref |
| std::vector< std::vector< std::vector< smoothingPair> > > Object::point_smoothCache |
| map<cvrIndex, map< unsigned int, map<unsigned short, set<cvrIndex>, ltushort>, ltuint >, ltindex> Object::mat_reflist |
mat_reflist stores material/face reference lists for storing face pointers by materials to avoid heavy texture context switching
1.5.6