Skip to content

PenguinClass

Michael edited this page May 23, 2023 · 5 revisions

A class that will contain loaded Penguin vertex buffers.

Properties

name

Type: string

The name of the vertex buffer, as saved from the editor.

submeshes

Type: array of <PenguinSubmesh>

An array of submeshes (eg separate vertex buffers created for different materials in an OBJ). Can be accessed individually or drawn all at once with the Render() method.

physical_bounds

Type: struct of { xmin, ymin, zmin, xmx, ymax, zmax }

A struct containing the minimum and maximum points of a bounding box containing the model. Occasionally useful.

collision_shapes

Type: array of <PenguinCollisionShape>

An array of collision shape structs. Useful for basic collision detection. These contain only geometry data and will not do collision detection for you.

Methods

Penguin::Clear()

Clears the Penguin object's submeshes and deletes their vertex buffers.

Penguin::Render()

Submits every vertex buffer contained in the Penguin object. If a sprite of the same name as the assigned diffuse texture in the editor exists in the project, it will be used. The Separate Texture Page option should be used for all of these sprites.

Vertex buffers will be submitted using the currently active shader. The currently active shader should be able to accept the vertex format the buffer was loaded with.

Clone this wiki locally