new AxMesh(context)
Creates a new mesh
Parameters:
Name | Type | Description |
---|---|---|
context |
Axis | The context to use for the mesh |
- Source:
Methods
ComputeBounds()
Computes the bounding volume of the mesh
- Source:
ComputeNormals()
Computes normals for the mesh based on averaging the orientation of shared faces
- Source:
ComputeTangents()
Computes tangent vectors for the mesh, based on the orientation of the mesh's texture mapping base vectors, by averaging the tangents of a vertex's shared faces
- Source:
CopyFrom(source)
Copies another mesh
Parameters:
Name | Type | Description |
---|---|---|
source |
AxMesh | The mesh to be copied |
- Source:
Deserialize(source) → {Boolean}
Deserializes the mesh from a given stream
Parameters:
Name | Type | Description |
---|---|---|
source |
AxStream | The stream holding the serialized data |
- Source:
Returns:
True if the deserialization was successfull
- Type
- Boolean
DeserializeChunk(reader) → {Boolean}
Reads the data of a chunk. The chunk header is already read by the reader and this method deserializes the contents of the chunk. Called continuously for each of the mesh's chunks
Parameters:
Name | Type | Description |
---|---|---|
reader |
AxHierarchyStreamReader | Reader to use for reading the serialized data. |
- Source:
Returns:
True if a chunk was successfully deserialized
- Type
- Boolean
Intersection(rayPoint, rayDir, intersectionInfo) → {Boolean}
Tests whether the mesh gets intersected by a given ray and gives details on the intersectoin
Parameters:
Name | Type | Description |
---|---|---|
rayPoint |
AxVector3 | Starting point of the ray |
rayDir |
AxVector3 | Orientation of the ray |
intersectionInfo |
AxIntersectionInfo | Outputs details on the intersection |
- Source:
Returns:
True if the mesh gets intersected by the given ray
- Type
- Boolean
SerializeChunks(writer)
Writes chunks for all the data which is needed to serialize the mesh.
Parameters:
Name | Type | Description |
---|---|---|
writer |
AxHierarchyStreamWriter | Writer to use for writing the serialization data |
- Source: