Python Script Engine
7.2
GL Studio Editor Python Script API
|
Public Member Functions | |
GlsGeometryResource (GlsGeometryResource &src) | |
GlsGeometryResource (disti::GlsGeometryResource *geometryResource, bool incEditorRef) | |
virtual void | DrawSetup (VertexAttribIndexLookup *shaderProgram) |
virtual void | DrawIndexBuffer (unsigned int bufferNumber) |
virtual void | DrawCleanup (VertexAttribIndexLookup *shaderProgram) |
virtual void | FreeOpenGLBuffers () |
virtual void | GetExtents (Vector &min, Vector &max, GlsMatrixAffine *matrix=NULL) |
virtual void | UpdateBoundingVolume () |
virtual bool | BoundingVolumeHit (Vector &point, Vector &direction) |
virtual bool | HitTest (unsigned char pickType, Vector &pickLinePoint, Vector &pickLineDirection, Vector &collisionPoint) |
virtual unsigned int | StatsIndexBufferVertexCount (unsigned int bufferNumber) |
virtual unsigned int | StatsIndexBufferPolygonCount (unsigned int bufferNumber) |
TypeDesc & | Type () |
void | IncrementReference () |
void | DecrementReference () |
unsigned int | NumIndexBuffers () |
Vector & | BoundingVolumeCenter () |
float | BoundingVolumeRadius () |
void | SetResourceId (unsigned int id) |
int | GetResourceId () |
Static Public Member Functions | |
static void | SetCreateInstanceMakesHalfFloat (bool value) |
static GlsGeometryResource * | CreateInstance (TypeDesc &type=GlsGeometryResource::TypeDesc()) |
Python engine extension for the GlsGeometryResource editor object.
GlsGeometryResource::GlsGeometryResource | ( | GlsGeometryResource & | src | ) |
GlsGeometryResource::GlsGeometryResource | ( | disti::GlsGeometryResource * | geometryResource, |
bool | incEditorRef | ||
) |
ctor
geometryResource | GlsGeometryResource to wrap |
incEditorRef | true if to increment editor ref on with wrapped group (i.e. if this pointer came from the editor) else false |
Vector& GlsGeometryResource::BoundingVolumeCenter | ( | ) |
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. |
float GlsGeometryResource::BoundingVolumeRadius | ( | ) |
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 |
void GlsGeometryResource::DecrementReference | ( | ) |
Decrement the Reference count to this instance.
The OpenGL context should be available to free resources.
|
virtual |
Restore the OpenGL state after rendering.
shaderProgram | Must be the same value that was passed to DrawSetup |
|
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 |
|
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) |
|
virtual |
Force the GlsGeometryResource to free any buffers it has allocated in the current OpenGL context.
|
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 |
int GlsGeometryResource::GetResourceId | ( | ) |
|
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. |
void GlsGeometryResource::IncrementReference | ( | ) |
Increment the Reference count to this instance.
unsigned int GlsGeometryResource::NumIndexBuffers | ( | ) |
|
static |
When enabled, GlsGeometryResource::CreateInstance will instantiate GlsGeometry_HalfFloat objects when possible.
void GlsGeometryResource::SetResourceId | ( | unsigned int | id | ) |
|
virtual |
Returns polygon count for use in editor statistics.
|
virtual |
Returns vertex count for use in editor statistics.
|
virtual |
Updates the bounding volume of this object This method should be called if the vertices change for picking and culling to work correctly.