Package org.lwjgl.assimp
Class AIScene
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIScene
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class AIScene extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
The root structure of the imported data.Everything that was imported from the given file can be accessed from here. Objects of this class are generally maintained and owned by Assimp, not by the caller. You shouldn't want to instance it, nor should you ever try to delete a given scene on your own.
Member documentation
mFlags
– Any combination of the AI_SCENE_FLAGS_XXX flags. By default this value is 0, no flags are set. Most applications will want to reject all scenes with the AI_SCENE_FLAGS_INCOMPLETE bit set. One or more of:Assimp.AI_SCENE_FLAGS_INCOMPLETE
Assimp.AI_SCENE_FLAGS_VALIDATED
Assimp.AI_SCENE_FLAGS_VALIDATION_WARNING
Assimp.AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
Assimp.AI_SCENE_FLAGS_TERRAIN
mRootNode
– The root node of the hierarchy. There will always be at least the root node if the import was successful (and no special flags have been set). Presence of further nodes depends on the format and content of the imported file.mNumMeshes
– The number of meshes in the scene.mMeshes
– The array of meshes. Use the indices given in theAINode
structure to access this array. The array ismNumMeshes
in size. If theAssimp.AI_SCENE_FLAGS_INCOMPLETE
flag is not set there will always be at least ONE material.mNumMaterials
– The number of materials in the scene.mMaterials
– The array of materials. Use the index given in eachAIMesh
structure to access this array. The array ismNumMaterials
in size. If theAssimp.AI_SCENE_FLAGS_INCOMPLETE
flag is not set there will always be at least ONE material.mNumAnimations
– The number of animations in the scene.mAnimations
– The array of animations. All animations imported from the given file are listed here. The array ismNumAnimations
in size.mNumTextures
– The number of textures embedded into the filemTextures
– The array of embedded textures. Not many file formats embed their textures into the file. An example is Quake's MDL format (which is also used by some GameStudio versions)mNumLights
– The number of light sources in the scene. Light sources are fully optional, in most cases this attribute will be 0mLights
– The array of light sources. All light sources imported from the given file are listed here. The array ismNumLights
in size.mNumCameras
– The number of cameras in the scene. Cameras are fully optional, in most cases this attribute will be 0mCameras
– The array of cameras. All cameras imported from the given file are listed here. The array ismNumCameras
in size. The first camera in the array (if existing) is the default camera view into the scene.mMetaData
– The global metadata assigned to the scene itself.This data contains global metadata which belongs to the scene like unit-conversions, versions, vendors or other model-specific data. This can be used to store format-specific metadata as well.
mPrivate
– Internal use only, do not touch!
Layout
struct aiScene { unsigned int mFlags;
struct aiNode
* mRootNode; unsigned int mNumMeshes;struct aiMesh
** mMeshes; unsigned int mNumMaterials;struct aiMaterial
** mMaterials; unsigned int mNumAnimations;struct aiAnimation
** mAnimations; unsigned int mNumTextures;struct aiTexture
** mTextures; unsigned int mNumLights;struct aiLight
** mLights; unsigned int mNumCameras;struct aiCamera
** mCameras;struct aiMetadata
* mMetaData; char * mPrivate; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIScene.Buffer
An array ofAIScene
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MANIMATIONS
MCAMERAS
MFLAGS
MLIGHTS
MMATERIALS
MMESHES
MMETADATA
MNUMANIMATIONS
MNUMCAMERAS
MNUMLIGHTS
MNUMMATERIALS
MNUMMESHES
MNUMTEXTURES
MPRIVATE
MROOTNODE
MTEXTURESThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIScene(java.nio.ByteBuffer container)
Creates aAIScene
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIScene
calloc()
Returns a newAIScene
instance allocated withmemCalloc
.static AIScene.Buffer
calloc(int capacity)
Returns a newAIScene.Buffer
instance allocated withmemCalloc
.static AIScene
callocStack()
Returns a newAIScene
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIScene.Buffer
callocStack(int capacity)
Returns a newAIScene.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIScene.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIScene
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIScene
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIScene
create()
Returns a newAIScene
instance allocated withBufferUtils
.static AIScene.Buffer
create(int capacity)
Returns a newAIScene.Buffer
instance allocated withBufferUtils
.static AIScene
create(long address)
Returns a newAIScene
instance for the specified memory address.static AIScene.Buffer
create(long address, int capacity)
Create aAIScene.Buffer
instance at the specified memory.static AIScene
createSafe(long address)
static AIScene.Buffer
createSafe(long address, int capacity)
static AIScene
malloc()
Returns a newAIScene
instance allocated withmemAlloc
.static AIScene.Buffer
malloc(int capacity)
Returns a newAIScene.Buffer
instance allocated withmemAlloc
.static AIScene
mallocStack()
Returns a newAIScene
instance allocated on the thread-localMemoryStack
.static AIScene.Buffer
mallocStack(int capacity)
Returns a newAIScene.Buffer
instance allocated on the thread-localMemoryStack
.static AIScene.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
.static AIScene
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIScene
instance allocated on the specifiedMemoryStack
.org.lwjgl.PointerBuffer
mAnimations()
Returns aPointerBuffer
view of the data pointed to by themAnimations
field.AIScene
mAnimations(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themAnimations
field.org.lwjgl.PointerBuffer
mCameras()
Returns aPointerBuffer
view of the data pointed to by themCameras
field.AIScene
mCameras(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themCameras
field.int
mFlags()
Returns the value of themFlags
field.AIScene
mFlags(int value)
Sets the specified value to themFlags
field.org.lwjgl.PointerBuffer
mLights()
Returns aPointerBuffer
view of the data pointed to by themLights
field.AIScene
mLights(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themLights
field.org.lwjgl.PointerBuffer
mMaterials()
Returns aPointerBuffer
view of the data pointed to by themMaterials
field.AIScene
mMaterials(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMaterials
field.org.lwjgl.PointerBuffer
mMeshes()
Returns aPointerBuffer
view of the data pointed to by themMeshes
field.AIScene
mMeshes(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMeshes
field.AIMetaData
mMetaData()
Returns aAIMetaData
view of the struct pointed to by themMetaData
field.AIScene
mMetaData(AIMetaData value)
Sets the address of the specifiedAIMetaData
to themMetaData
field.int
mNumAnimations()
Returns the value of themNumAnimations
field.int
mNumCameras()
Returns the value of themNumCameras
field.int
mNumLights()
Returns the value of themNumLights
field.int
mNumMaterials()
Returns the value of themNumMaterials
field.int
mNumMeshes()
Returns the value of themNumMeshes
field.int
mNumTextures()
Returns the value of themNumTextures
field.AINode
mRootNode()
Returns aAINode
view of the struct pointed to by themRootNode
field.AIScene
mRootNode(AINode value)
Sets the address of the specifiedAINode
to themRootNode
field.org.lwjgl.PointerBuffer
mTextures()
Returns aPointerBuffer
view of the data pointed to by themTextures
field.AIScene
mTextures(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themTextures
field.static org.lwjgl.PointerBuffer
nmAnimations(long struct)
Unsafe version ofmAnimations
.static void
nmAnimations(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmAnimations
.static org.lwjgl.PointerBuffer
nmCameras(long struct)
Unsafe version ofmCameras
.static void
nmCameras(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmCameras
.static int
nmFlags(long struct)
Unsafe version ofmFlags()
.static void
nmFlags(long struct, int value)
Unsafe version ofmFlags
.static org.lwjgl.PointerBuffer
nmLights(long struct)
Unsafe version ofmLights
.static void
nmLights(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmLights
.static org.lwjgl.PointerBuffer
nmMaterials(long struct)
Unsafe version ofmMaterials
.static void
nmMaterials(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmMaterials
.static org.lwjgl.PointerBuffer
nmMeshes(long struct)
Unsafe version ofmMeshes
.static void
nmMeshes(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmMeshes
.static AIMetaData
nmMetaData(long struct)
Unsafe version ofmMetaData()
.static void
nmMetaData(long struct, AIMetaData value)
Unsafe version ofmMetaData
.static int
nmNumAnimations(long struct)
Unsafe version ofmNumAnimations()
.static void
nmNumAnimations(long struct, int value)
Sets the specified value to themNumAnimations
field of the specifiedstruct
.static int
nmNumCameras(long struct)
Unsafe version ofmNumCameras()
.static void
nmNumCameras(long struct, int value)
Sets the specified value to themNumCameras
field of the specifiedstruct
.static int
nmNumLights(long struct)
Unsafe version ofmNumLights()
.static void
nmNumLights(long struct, int value)
Sets the specified value to themNumLights
field of the specifiedstruct
.static int
nmNumMaterials(long struct)
Unsafe version ofmNumMaterials()
.static void
nmNumMaterials(long struct, int value)
Sets the specified value to themNumMaterials
field of the specifiedstruct
.static int
nmNumMeshes(long struct)
Unsafe version ofmNumMeshes()
.static void
nmNumMeshes(long struct, int value)
Sets the specified value to themNumMeshes
field of the specifiedstruct
.static int
nmNumTextures(long struct)
Unsafe version ofmNumTextures()
.static void
nmNumTextures(long struct, int value)
Sets the specified value to themNumTextures
field of the specifiedstruct
.static java.nio.ByteBuffer
nmPrivate(long struct, int capacity)
static void
nmPrivate(long struct, java.nio.ByteBuffer value)
static AINode
nmRootNode(long struct)
Unsafe version ofmRootNode()
.static void
nmRootNode(long struct, AINode value)
Unsafe version ofmRootNode
.static org.lwjgl.PointerBuffer
nmTextures(long struct)
Unsafe version ofmTextures
.static void
nmTextures(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmTextures
.AIScene
set(int mFlags, AINode mRootNode, org.lwjgl.PointerBuffer mMeshes, org.lwjgl.PointerBuffer mMaterials, org.lwjgl.PointerBuffer mAnimations, org.lwjgl.PointerBuffer mTextures, org.lwjgl.PointerBuffer mLights, org.lwjgl.PointerBuffer mCameras, AIMetaData mMetaData)
Initializes this struct with the specified values.AIScene
set(AIScene src)
Copies the specified struct data to this struct.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
AIScene
public AIScene(java.nio.ByteBuffer container)
Creates aAIScene
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
mFlags
public int mFlags()
Returns the value of themFlags
field.
-
mRootNode
@Nullable public AINode mRootNode()
Returns aAINode
view of the struct pointed to by themRootNode
field.
-
mNumMeshes
public int mNumMeshes()
Returns the value of themNumMeshes
field.
-
mMeshes
@Nullable public org.lwjgl.PointerBuffer mMeshes()
Returns aPointerBuffer
view of the data pointed to by themMeshes
field.
-
mNumMaterials
public int mNumMaterials()
Returns the value of themNumMaterials
field.
-
mMaterials
@Nullable public org.lwjgl.PointerBuffer mMaterials()
Returns aPointerBuffer
view of the data pointed to by themMaterials
field.
-
mNumAnimations
public int mNumAnimations()
Returns the value of themNumAnimations
field.
-
mAnimations
@Nullable public org.lwjgl.PointerBuffer mAnimations()
Returns aPointerBuffer
view of the data pointed to by themAnimations
field.
-
mNumTextures
public int mNumTextures()
Returns the value of themNumTextures
field.
-
mTextures
@Nullable public org.lwjgl.PointerBuffer mTextures()
Returns aPointerBuffer
view of the data pointed to by themTextures
field.
-
mNumLights
public int mNumLights()
Returns the value of themNumLights
field.
-
mLights
@Nullable public org.lwjgl.PointerBuffer mLights()
Returns aPointerBuffer
view of the data pointed to by themLights
field.
-
mNumCameras
public int mNumCameras()
Returns the value of themNumCameras
field.
-
mCameras
@Nullable public org.lwjgl.PointerBuffer mCameras()
Returns aPointerBuffer
view of the data pointed to by themCameras
field.
-
mMetaData
@Nullable public AIMetaData mMetaData()
Returns aAIMetaData
view of the struct pointed to by themMetaData
field.
-
mFlags
public AIScene mFlags(int value)
Sets the specified value to themFlags
field.
-
mRootNode
public AIScene mRootNode(@Nullable AINode value)
Sets the address of the specifiedAINode
to themRootNode
field.
-
mMeshes
public AIScene mMeshes(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMeshes
field.
-
mMaterials
public AIScene mMaterials(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMaterials
field.
-
mAnimations
public AIScene mAnimations(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themAnimations
field.
-
mTextures
public AIScene mTextures(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themTextures
field.
-
mLights
public AIScene mLights(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themLights
field.
-
mCameras
public AIScene mCameras(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themCameras
field.
-
mMetaData
public AIScene mMetaData(@Nullable AIMetaData value)
Sets the address of the specifiedAIMetaData
to themMetaData
field.
-
set
public AIScene set(int mFlags, @Nullable AINode mRootNode, @Nullable org.lwjgl.PointerBuffer mMeshes, @Nullable org.lwjgl.PointerBuffer mMaterials, @Nullable org.lwjgl.PointerBuffer mAnimations, @Nullable org.lwjgl.PointerBuffer mTextures, @Nullable org.lwjgl.PointerBuffer mLights, @Nullable org.lwjgl.PointerBuffer mCameras, @Nullable AIMetaData mMetaData)
Initializes this struct with the specified values.
-
set
public AIScene set(AIScene src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AIScene malloc()
Returns a newAIScene
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIScene calloc()
Returns a newAIScene
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIScene create()
Returns a newAIScene
instance allocated withBufferUtils
.
-
create
public static AIScene create(long address)
Returns a newAIScene
instance for the specified memory address.
-
createSafe
@Nullable public static AIScene createSafe(long address)
-
malloc
public static AIScene.Buffer malloc(int capacity)
Returns a newAIScene.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIScene.Buffer calloc(int capacity)
Returns a newAIScene.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIScene.Buffer create(int capacity)
Returns a newAIScene.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIScene.Buffer create(long address, int capacity)
Create aAIScene.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIScene.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIScene mallocStack()
Returns a newAIScene
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIScene callocStack()
Returns a newAIScene
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIScene mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIScene
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIScene callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIScene
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static AIScene.Buffer mallocStack(int capacity)
Returns a newAIScene.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIScene.Buffer callocStack(int capacity)
Returns a newAIScene.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static AIScene.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static AIScene.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmFlags
public static int nmFlags(long struct)
Unsafe version ofmFlags()
.
-
nmRootNode
@Nullable public static AINode nmRootNode(long struct)
Unsafe version ofmRootNode()
.
-
nmNumMeshes
public static int nmNumMeshes(long struct)
Unsafe version ofmNumMeshes()
.
-
nmMeshes
@Nullable public static org.lwjgl.PointerBuffer nmMeshes(long struct)
Unsafe version ofmMeshes
.
-
nmNumMaterials
public static int nmNumMaterials(long struct)
Unsafe version ofmNumMaterials()
.
-
nmMaterials
@Nullable public static org.lwjgl.PointerBuffer nmMaterials(long struct)
Unsafe version ofmMaterials
.
-
nmNumAnimations
public static int nmNumAnimations(long struct)
Unsafe version ofmNumAnimations()
.
-
nmAnimations
@Nullable public static org.lwjgl.PointerBuffer nmAnimations(long struct)
Unsafe version ofmAnimations
.
-
nmNumTextures
public static int nmNumTextures(long struct)
Unsafe version ofmNumTextures()
.
-
nmTextures
@Nullable public static org.lwjgl.PointerBuffer nmTextures(long struct)
Unsafe version ofmTextures
.
-
nmNumLights
public static int nmNumLights(long struct)
Unsafe version ofmNumLights()
.
-
nmLights
@Nullable public static org.lwjgl.PointerBuffer nmLights(long struct)
Unsafe version ofmLights
.
-
nmNumCameras
public static int nmNumCameras(long struct)
Unsafe version ofmNumCameras()
.
-
nmCameras
@Nullable public static org.lwjgl.PointerBuffer nmCameras(long struct)
Unsafe version ofmCameras
.
-
nmMetaData
@Nullable public static AIMetaData nmMetaData(long struct)
Unsafe version ofmMetaData()
.
-
nmPrivate
public static java.nio.ByteBuffer nmPrivate(long struct, int capacity)
-
nmFlags
public static void nmFlags(long struct, int value)
Unsafe version ofmFlags
.
-
nmRootNode
public static void nmRootNode(long struct, @Nullable AINode value)
Unsafe version ofmRootNode
.
-
nmNumMeshes
public static void nmNumMeshes(long struct, int value)
Sets the specified value to themNumMeshes
field of the specifiedstruct
.
-
nmMeshes
public static void nmMeshes(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmMeshes
.
-
nmNumMaterials
public static void nmNumMaterials(long struct, int value)
Sets the specified value to themNumMaterials
field of the specifiedstruct
.
-
nmMaterials
public static void nmMaterials(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmMaterials
.
-
nmNumAnimations
public static void nmNumAnimations(long struct, int value)
Sets the specified value to themNumAnimations
field of the specifiedstruct
.
-
nmAnimations
public static void nmAnimations(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmAnimations
.
-
nmNumTextures
public static void nmNumTextures(long struct, int value)
Sets the specified value to themNumTextures
field of the specifiedstruct
.
-
nmTextures
public static void nmTextures(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmTextures
.
-
nmNumLights
public static void nmNumLights(long struct, int value)
Sets the specified value to themNumLights
field of the specifiedstruct
.
-
nmLights
public static void nmLights(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmLights
.
-
nmNumCameras
public static void nmNumCameras(long struct, int value)
Sets the specified value to themNumCameras
field of the specifiedstruct
.
-
nmCameras
public static void nmCameras(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmCameras
.
-
nmMetaData
public static void nmMetaData(long struct, @Nullable AIMetaData value)
Unsafe version ofmMetaData
.
-
nmPrivate
public static void nmPrivate(long struct, java.nio.ByteBuffer value)
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-