HGamer3D-Ogre-Binding-0.1.8: Library to enable 3D game development for Haskell - Ogre Bindings

Safe HaskellSafe-Infered

HGamer3D.Bindings.Ogre.ClassManualObject

Synopsis

Documentation

newSource

Arguments

:: String

name

-> IO HG3DClass 

deleteSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance which is going to be deleted.

-> IO () 

Completely clear the contents of the object. Clearing the contents of this object and rebuilding from scratch is not the optimal way to manage dynamic vertex data, since the buffers are recreated. If you want to keep the same structure but update the content within that structure, use beginUpdate()clear()begin()

clearSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Estimate the number of vertices ahead of time. Calling this helps to avoid memory reallocation when you define vertices. Also very handy when using beginUpdate()

estimateVertexCountSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

vcount

-> IO () 

Estimate the number of indices ahead of time. Calling this helps to avoid memory reallocation when you define indices. Also very handy when using beginUpdate()

estimateIndexCountSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

icount

-> IO () 

Start defining a part of the object. Each time you call this method, you start a new section of the object with its own material and potentially its own type of rendering operation (triangles, points or lines for example).

beginSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

materialName - The name of the material to render this part of the object with.

-> EnumRenderOperationOperationType

opType - The type of operation to use to render.

-> String

groupName

-> IO () 

Use before defining geometry to indicate that you intend to update the geometry regularly and want the internal structure to reflect that.

setDynamicSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

dyn

-> IO () 

Gets whether this object is marked as dynamic

getDynamicSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

beginUpdateSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

sectionIndex - The index of the section you want to update. The first call to begin() would have created section 0, the second section 1, etc.

-> IO () 

Add a vertex position, starting a new vertex at the same time. A vertex position is slightly special among the other vertex data methods like normal()textureCoord()position()

Start the definition of an update to a part of the object. Using this method, you can update an existing section of the object efficiently. You do not have the option of changing the operation type obviously, since it must match the one that was used before. If your sections are changing size, particularly growing, use estimateVertexCount and estimateIndexCount to pre-size the buffers a little larger than the initial needs to avoid buffer reconstruction.

positionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Vec3

pos

-> IO () 

Add a vertex position, starting a new vertex at the same time. A vertex position is slightly special among the other vertex data methods like normal()textureCoord()position()

position2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

x

-> Float

y

-> Float

z

-> IO () 

Add a vertex normal to the current vertex. Vertex normals are most often used for dynamic lighting, and their components should be normalised.

normalSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Vec3

norm

-> IO () 

Add a vertex normal to the current vertex. Vertex normals are most often used for dynamic lighting, and their components should be normalised.

normal2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

x

-> Float

y

-> Float

z

-> IO () 

Add a vertex tangent to the current vertex. Vertex tangents are most often used for dynamic lighting, and their components should be normalised. Also, using tangent()

tangentSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Vec3

tan

-> IO () 

Add a vertex tangent to the current vertex. Vertex tangents are most often used for dynamic lighting, and their components should be normalised. Also, using tangent()

tangent2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

x

-> Float

y

-> Float

z

-> IO () 

Add a texture coordinate to the current vertex. You can call this method multiple times between position()

textureCoordSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

u

-> IO () 

Add a texture coordinate to the current vertex. You can call this method multiple times between position()

textureCoord2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

u

-> Float

v

-> IO () 

Add a texture coordinate to the current vertex. You can call this method multiple times between position()

textureCoord3Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

u

-> Float

v

-> Float

w

-> IO () 

Add a texture coordinate to the current vertex. You can call this method multiple times between position()

textureCoord4Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

x

-> Float

y

-> Float

z

-> Float

w

-> IO () 

Add a texture coordinate to the current vertex. You can call this method multiple times between position()

textureCoord5Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Vec2

uv

-> IO () 

Add a texture coordinate to the current vertex. You can call this method multiple times between position()

textureCoord6Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Vec3

uvw

-> IO () 

Add a vertex colour to a vertex.

colourSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Colour

col

-> IO () 

Add a vertex colour to a vertex.

colour2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

r - Colour components expressed as floating point numbers from 0-1

-> Float

g

-> Float

b

-> Float

a

-> IO () 

Add a vertex index to construct faces lines points via indexing rather than just by a simple list of vertices. You will have to call this 3 times for each face for a triangle list, or use the alternative 3-parameter version. Other operation types require different numbers of indexes, RenderOperation::OperationType32-bit indexes are not supported on all cards and will only be used when required, if an index is > 65535.

indexSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

idx - A vertex index from 0 to 4294967295.

-> IO () 

Add a set of 3 vertex indices to construct a triangle; this is a shortcut to calling index()32-bit indexes are not supported on all cards and will only be used when required, if an index is > 65535.

triangleSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

i1 - 3 vertex indices from 0 to 4294967295 defining a face.

-> Int

i2

-> Int

i3

-> IO () 

Add a set of 4 vertex indices to construct a quad (out of 2 triangles); this is a shortcut to calling index()triangle()32-bit indexes are not supported on all cards and will only be used when required, if an index is > 65535.

quadSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

i1 - 3 vertex indices from 0 to 4294967295 defining a face.

-> Int

i2

-> Int

i3

-> Int

i4

-> IO () 

Finish defining the object and compile the final renderable version. Will return a pointer to the finished section or NULL if the section was discarded (i.e. has zero vertices/indices).

endSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

setMaterialNameSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

subindex

-> String

name - The name of the new material to use

-> String

group

-> IO () 

Convert this object to a MeshAfter you've finished building this object, you may convert it to a MeshEntitySceneNodeOnly objects which use indexed geometry may be converted to a mesh.

Alter the material for a subsection of this object after it has been specified. You specify the material to use on a section of this object during the call to begin()

convertToMeshSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

meshName - The name to give the mesh

-> String

groupName - The resource group to create the mesh in

-> IO SharedPtr 

setUseIdentityProjectionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

useIdentityProjection

-> IO () 

Returns whether or not to use an identity projection. Usually ManualObjects will use a projection matrix as determined by the active camera. However, if they want they can cancel this out and use an identity projection, which effectively projects in 2D using a {-1, 1} view space. Useful for overlay rendering. Normally you don't need to change this. ManualObject::setUseIdentityProjection

Sets whether or not to use an identity projection. Usually ManualObjects will use a projection matrix as determined by the active camera. However, if they want they can cancel this out and use an identity projection, which effectively projects in 2D using a {-1, 1} view space. Useful for overlay rendering. Normally you don't need to change this. The default is false. ManualObject::getUseIdentityProjection

getUseIdentityProjectionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

setUseIdentityViewSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

useIdentityView

-> IO () 

Returns whether or not to use an identity view. Usually ManualObjects will use a view matrix as determined by the active camera. However, if they want they can cancel this out and use an identity matrix, which means all geometry is assumed to be relative to camera space already. Useful for overlay rendering. Normally you don't need to change this. ManualObject::setUseIdentityView

Sets whether or not to use an identity view. Usually ManualObjects will use a view matrix as determined by the active camera. However, if they want they can cancel this out and use an identity matrix, which means all geometry is assumed to be relative to camera space already. Useful for overlay rendering. Normally you don't need to change this. The default is false. ManualObject::getUseIdentityView

getUseIdentityViewSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

getSectionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

index

-> IO HG3DClass 

Gets a pointer to a ManualObjectSectionManualObject

getNumSectionsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int 

Retrieves the number of ManualObjectSectionManualObject

setKeepDeclarationOrderSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

keepOrder - Whether to keep the declaration order or not.

-> IO () 

Gets whether or not the declaration order is to be kept or not.

Sets whether or not to keep the original declaration order when queuing the renderables. This overrides the default behavior of the rendering queue, specifically stating the desired order of rendering. Might result in a performance loss, but lets the user to have more direct control when creating geometry through this class.

getKeepDeclarationOrderSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool

return value - A flag indication if the declaration order will be kept when queuing the renderables.

getMovableTypeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO String 

. - Details: Returns the type name of this object.

getBoundingRadiusSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

. - Details: Retrieves the radius of the origin-centered bounding sphere for this object.

hasEdgeListSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Overridden member from ShadowCaster.