|  | GL Studio C++ Runtime API
    | 
#include <gls_geometry_resource.h>
 
  
 | Classes | |
| class | TypeDesc | 
| Public Member Functions | |
| virtual void | DrawSetup (VertexAttribIndexLookup *shaderProgram)=0 | 
| virtual void | DrawIndexBuffer (unsigned int bufferNumber)=0 | 
| virtual void | DrawCleanup (VertexAttribIndexLookup *shaderProgram)=0 | 
| virtual void | FreeOpenGLBuffers ()=0 | 
| virtual unsigned int | GetDataChangedCounter () const =0 | 
| virtual void | GetExtents (Vector &min, Vector &max, const GlsMatrixType *matrix=NULL)=0 | 
| virtual void | UpdateBoundingVolume ()=0 | 
| virtual bool | BoundingVolumeHit (const Vector &point, const Vector &direction)=0 | 
| virtual bool | HitTest (unsigned char pickType, const Vector &pickLinePoint, const Vector &pickLineDirection, Vector &collisionPoint)=0 | 
| virtual unsigned int | StatsIndexBufferVertexCount (unsigned int bufferNumber)=0 | 
| virtual unsigned int | StatsIndexBufferPolygonCount (unsigned int bufferNumber)=0 | 
| const TypeDesc & | Type () | 
| void | IncrementReference () | 
| void | DecrementReference () | 
| unsigned int | NumIndexBuffers () const | 
| const Vector & | BoundingVolumeCenter () const | 
| float | BoundingVolumeRadius () const | 
| void | SetResourceId (unsigned int id) | 
| unsigned int | GetResourceId (void) | 
| Static Public Member Functions | |
| static void | SetCreateInstanceMakesHalfFloat (bool value) | 
| static GlsGeometryResource * | CreateInstance (const TypeDesc &type=GlsGeometryResource::TypeDesc()) | 
| static GlsGeometryResource * | CreateInstance (GlsResourceFileMgr::ResourceRef *resource) | 
| Static Public Attributes | |
| static const unsigned int | VERTEX_ATTRIBUTE_SIZE = 3 * sizeof( float ) | 
| static const unsigned int | s_invalidDataChangedCounter = 0 | 
| Protected Member Functions | |
| virtual void | Destroy ()=0 | 
| Protected Attributes | |
| unsigned int | _resourceID | 
| unsigned int | _referenceCount | 
| TypeDesc | _type | 
| unsigned int | _numIndexBuffers | 
The geometry resource abstract base class
| 
 | inline | 
Get the bounding sphere center
Determines if the given ray hits the geometry bounding volume. Note: All parameters should be in this object's coordinates.
| point | The starting point of the ray. | 
| direction | The direction vector of the ray. | 
Implemented in GlsGeometry_Generic.
| 
 | inline | 
Get the bounding sphere radius
| 
 | static | 
Construct an empty GlsGeometryResource with the given type The initial reference count is 1. Call DecrementReference to free the resource when you are done with it.
| type | A description of the initial Structure | 
| 
 | static | 
Construct a GlsGeometryResource from a binary resource The initial reference count is 1. Call DecrementReference to free the GlsGeometryResource when you are done with it.
| resource | pointer to a ResourceRef containing geometry data | 
| 
 | inline | 
Decrement the Reference count to this instance.
| 
 | protectedpure virtual | 
Deletes this object from the heap that it was allocated on
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Restore the OpenGL state after rendering.
| shaderProgram | Must be the same value that was passed to DrawSetup | 
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Draw the geometry specified by the given index buffer This method should only be called between calls to DrawSetup and DrawCleanup.
| bufferNumber | Which index buffer to draw | 
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Setup the OpenGL state for rendering this geometry. To draw, call DrawIndexBuffer for each index buffer in the resource. After drawing, call DrawCleanup to restore the OpenGL state.
| shaderProgram | interface to the shader program, used to lookup correct VertexAttrib index values (may be NULL) | 
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Force the GlsGeometryResource to free any buffers it has allocated in the current OpenGL context.
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Since calculating metrics like the extents can be an expensive operation, the user can call this function to see if the geometry resource has changed. Caching the expensive-to-calculate values is the responsibility of the caller.
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Calculate and return the geometry extents
| min | Returns the minimum x,y,z values | 
| max | Returns the maximum x,y,z values | 
| matrix | (Optional) matrix to transform the vertices into the desired coordinate system | 
Implemented in GlsGeometry_Generic.
| 
 | inline | 
Gets the current resource ID
| 
 | pure virtual | 
Hit test the geometry against a picking line. All values are in geometry space.
| pickType | The type of picking (see PickableType_e), must be PICK_FIRST or PICK_BEST | 
| pickLinePoint | A point on the pick line. | 
| pickLineDirection | The direction of the pick line. | 
| collisionPoint | If the method returns true, this contains the point that was hit. | 
Implemented in GlsGeometry_Generic.
| 
 | inline | 
Increment the Reference count to this instance.
| 
 | inline | 
Returns The number of index buffers in this geometry resource.
| 
 | static | 
When enabled, GlsGeometryResource::CreateInstance will instantiate GlsGeometry_HalfFloat objects when possible.
| 
 | inline | 
Sets a new resource ID
| id | The new ID | 
| 
 | pure virtual | 
Returns polygon count for use in editor statistics
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Returns vertex count for use in editor statistics
Implemented in GlsGeometry_Generic.
| 
 | pure virtual | 
Updates the bounding volume of this object This method should be called if the vertices change for picking and culling to work correctly.
Implemented in GlsGeometry_Generic.
| 
 | protected | 
The number of index buffers in this mesh
| 
 | protected | 
The number of Parent Objects using this object. Once the number reaches zero, the object self deletes.
| 
 | protected | 
Give this Resource a unique id so we can get it.
| 
 | static | 
A sentinel value for clients to initialize their counts with. GetDataChangedCounter() will never return this value.
| 
 | static | 
The sizes of various vertex attributes, in bytes.