public class FacesDescriptionChunk extends Chunk
| Modifier and Type | Field and Description |
|---|---|
static Appearance |
DEFAULT_APPEARANCE |
| Constructor and Description |
|---|
FacesDescriptionChunk() |
| Modifier and Type | Method and Description |
|---|---|
Vector3f |
averageNormals(Vector3f[] normals)
Averages the normals provided in order to provide
smooth, noncreased appearances for meshes.
|
void |
initialize(ChunkChopper chopper)
Loads a mesh onto the scene graph with the specified data
from subchunks.
|
void |
loadData(ChunkChopper chopper)
Reads the number of faces from the ChunkChopper.
|
Vector3f[] |
smoothNormals(Vector3f[] currentNormals,
com.microcrowd.loader.java3d.max3ds.chunks.FacesDescriptionChunk.PointMapper sharedPoints,
int[] smoothGroups)
Takes all the normals for all the vertices and averages them with
normals with which they share a coordinate and at least one smooth group.
|
addSubChunk, getDescription, getName, getSubChunk, setDescription, setName, toStringpublic void loadData(ChunkChopper chopper)
public void initialize(ChunkChopper chopper)
initialize in class Chunkchopper - may contain data loaded by subchunks.public Vector3f[] smoothNormals(Vector3f[] currentNormals,
com.microcrowd.loader.java3d.max3ds.chunks.FacesDescriptionChunk.PointMapper sharedPoints,
int[] smoothGroups)
currentNormals - the normals for each face.sharedPoints - the point mapper that will choose which points are
and which are not shared.smoothGroups - the indexed list of group masks loaded by the smooth chunk.public Vector3f averageNormals(Vector3f[] normals)
normals - the normals that should be averagedCopyright © 2000-2013 Microcrowd. All Rights Reserved.