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