Package org.lwjgl.assimp
Class AIScene
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
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.
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()
;
struct aiString
mName()
;
unsigned int mNumSkeletons;
struct aiSkeleton
** mSkeletons;
char * mPrivate;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionAIScene
(ByteBuffer container) Creates aAIScene
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic AIScene
calloc()
Returns a newAIScene
instance allocated withmemCalloc
.static AIScene.Buffer
calloc
(int capacity) Returns a newAIScene.Buffer
instance allocated withmemCalloc
.static AIScene.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIScene
calloc
(MemoryStack stack) Returns a newAIScene
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIScene
Deprecated.static AIScene.Buffer
callocStack
(int capacity) Deprecated.static AIScene.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static AIScene
callocStack
(MemoryStack stack) Deprecated.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.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
.static AIScene
malloc
(MemoryStack stack) Returns a newAIScene
instance allocated on the specifiedMemoryStack
.static AIScene
Deprecated.static AIScene.Buffer
mallocStack
(int capacity) Deprecated.static AIScene.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static AIScene
mallocStack
(MemoryStack stack) Deprecated.The array of animations.mAnimations
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themAnimations()
field.mCameras()
The array of cameras.mCameras
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themCameras()
field.int
mFlags()
Any combination of the AI_SCENE_FLAGS_XXX flags.mFlags
(int value) Sets the specified value to themFlags()
field.mLights()
The array of light sources.mLights
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themLights()
field.The array of materials.mMaterials
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themMaterials()
field.mMeshes()
The array of meshes.mMeshes
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themMeshes()
field.The global metadata assigned to the scene itself.mMetaData
(AIMetaData value) Sets the address of the specifiedAIMetaData
to themMetaData()
field.mName()
The name of the scene itself.int
The number of animations in the scene.int
The number of cameras in the scene.int
The number of light sources in the scene.int
The number of materials in the scene.int
The number of meshes in the scene.int
int
The number of textures embedded into the fileThe root node of the hierarchy.Sets the address of the specifiedAINode
to themRootNode()
field.mSkeletons
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themSkeletons
field.The array of embedded textures.mTextures
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themTextures()
field.static PointerBuffer
nmAnimations
(long struct) Unsafe version ofmAnimations
.static void
nmAnimations
(long struct, PointerBuffer value) Unsafe version ofmAnimations
.static PointerBuffer
nmCameras
(long struct) Unsafe version ofmCameras
.static void
nmCameras
(long struct, PointerBuffer value) Unsafe version ofmCameras
.static int
nmFlags
(long struct) Unsafe version ofmFlags()
.static void
nmFlags
(long struct, int value) Unsafe version ofmFlags
.static PointerBuffer
nmLights
(long struct) Unsafe version ofmLights
.static void
nmLights
(long struct, PointerBuffer value) Unsafe version ofmLights
.static PointerBuffer
nmMaterials
(long struct) Unsafe version ofmMaterials
.static void
nmMaterials
(long struct, PointerBuffer value) Unsafe version ofmMaterials
.static PointerBuffer
nmMeshes
(long struct) Unsafe version ofmMeshes
.static void
nmMeshes
(long struct, PointerBuffer value) Unsafe version ofmMeshes
.static AIMetaData
nmMetaData
(long struct) Unsafe version ofmMetaData()
.static void
nmMetaData
(long struct, AIMetaData value) Unsafe version ofmMetaData
.static AIString
nmName
(long struct) Unsafe version ofmName()
.static void
Unsafe version ofmName
.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
nmNumSkeletons
(long struct) Unsafe version ofmNumSkeletons()
.static void
nmNumSkeletons
(long struct, int value) Sets the specified value to themNumSkeletons
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 ByteBuffer
nmPrivate
(long struct, int capacity) static void
nmPrivate
(long struct, ByteBuffer value) static AINode
nmRootNode
(long struct) Unsafe version ofmRootNode()
.static void
nmRootNode
(long struct, AINode value) Unsafe version ofmRootNode
.static PointerBuffer
nmSkeletons
(long struct) Unsafe version ofmSkeletons
.static void
nmSkeletons
(long struct, PointerBuffer value) Unsafe version ofmSkeletons
.static PointerBuffer
nmTextures
(long struct) Unsafe version ofmTextures
.static void
nmTextures
(long struct, PointerBuffer value) Unsafe version ofmTextures
.set
(int mFlags, AINode mRootNode, PointerBuffer mMeshes, PointerBuffer mMaterials, PointerBuffer mAnimations, PointerBuffer mTextures, PointerBuffer mLights, PointerBuffer mCameras, AIMetaData mMetaData, AIString mName, PointerBuffer mSkeletons) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
MFLAGS
public static final int MFLAGSThe struct member offsets. -
MROOTNODE
public static final int MROOTNODEThe struct member offsets. -
MNUMMESHES
public static final int MNUMMESHESThe struct member offsets. -
MMESHES
public static final int MMESHESThe struct member offsets. -
MNUMMATERIALS
public static final int MNUMMATERIALSThe struct member offsets. -
MMATERIALS
public static final int MMATERIALSThe struct member offsets. -
MNUMANIMATIONS
public static final int MNUMANIMATIONSThe struct member offsets. -
MANIMATIONS
public static final int MANIMATIONSThe struct member offsets. -
MNUMTEXTURES
public static final int MNUMTEXTURESThe struct member offsets. -
MTEXTURES
public static final int MTEXTURESThe struct member offsets. -
MNUMLIGHTS
public static final int MNUMLIGHTSThe struct member offsets. -
MLIGHTS
public static final int MLIGHTSThe struct member offsets. -
MNUMCAMERAS
public static final int MNUMCAMERASThe struct member offsets. -
MCAMERAS
public static final int MCAMERASThe struct member offsets. -
MMETADATA
public static final int MMETADATAThe struct member offsets. -
MNAME
public static final int MNAMEThe struct member offsets. -
MNUMSKELETONS
public static final int MNUMSKELETONSThe struct member offsets. -
MSKELETONS
public static final int MSKELETONSThe struct member offsets. -
MPRIVATE
public static final int MPRIVATEThe struct member offsets.
-
-
Constructor Details
-
AIScene
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
. -
mFlags
public int 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
public int 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
public int 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
public int 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
public int mNumTextures()The number of textures embedded into the file -
mTextures
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
public int mNumLights()The number of light sources in the scene. Light sources are fully optional, in most cases this attribute will be 0 -
mLights
The array of light sources. All light sources imported from the given file are listed here. The array ismNumLights
in size. -
mNumCameras
public int mNumCameras()The number of cameras in the scene. Cameras are fully optional, in most cases this attribute will be 0 -
mCameras
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.
-
mName
The name of the scene itself. -
mNumSkeletons
public int mNumSkeletons()- Returns:
- the value of the
mNumSkeletons
field.
-
mSkeletons
- Returns:
- a
PointerBuffer
view of the data pointed to by themSkeletons
field.
-
mFlags
Sets the specified value to themFlags()
field. -
mRootNode
Sets the address of the specifiedAINode
to themRootNode()
field. -
mMeshes
Sets the address of the specifiedPointerBuffer
to themMeshes()
field. -
mMaterials
Sets the address of the specifiedPointerBuffer
to themMaterials()
field. -
mAnimations
Sets the address of the specifiedPointerBuffer
to themAnimations()
field. -
mTextures
Sets the address of the specifiedPointerBuffer
to themTextures()
field. -
mLights
Sets the address of the specifiedPointerBuffer
to themLights()
field. -
mCameras
Sets the address of the specifiedPointerBuffer
to themCameras()
field. -
mMetaData
Sets the address of the specifiedAIMetaData
to themMetaData()
field. -
mName
-
mName
-
mSkeletons
Sets the address of the specifiedPointerBuffer
to themSkeletons
field. -
set
public AIScene set(int mFlags, @Nullable AINode mRootNode, @Nullable PointerBuffer mMeshes, @Nullable PointerBuffer mMaterials, @Nullable PointerBuffer mAnimations, @Nullable PointerBuffer mTextures, @Nullable PointerBuffer mLights, @Nullable PointerBuffer mCameras, @Nullable AIMetaData mMetaData, AIString mName, @Nullable PointerBuffer mSkeletons) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newAIScene
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newAIScene
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newAIScene
instance allocated withBufferUtils
. -
create
Returns a newAIScene
instance for the specified memory address. -
createSafe
-
malloc
Returns a newAIScene.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newAIScene.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newAIScene.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aAIScene.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newAIScene
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newAIScene
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nmFlags
public static int nmFlags(long struct) Unsafe version ofmFlags()
. -
nmRootNode
Unsafe version ofmRootNode()
. -
nmNumMeshes
public static int nmNumMeshes(long struct) Unsafe version ofmNumMeshes()
. -
nmMeshes
Unsafe version ofmMeshes
. -
nmNumMaterials
public static int nmNumMaterials(long struct) Unsafe version ofmNumMaterials()
. -
nmMaterials
Unsafe version ofmMaterials
. -
nmNumAnimations
public static int nmNumAnimations(long struct) Unsafe version ofmNumAnimations()
. -
nmAnimations
Unsafe version ofmAnimations
. -
nmNumTextures
public static int nmNumTextures(long struct) Unsafe version ofmNumTextures()
. -
nmTextures
Unsafe version ofmTextures
. -
nmNumLights
public static int nmNumLights(long struct) Unsafe version ofmNumLights()
. -
nmLights
Unsafe version ofmLights
. -
nmNumCameras
public static int nmNumCameras(long struct) Unsafe version ofmNumCameras()
. -
nmCameras
Unsafe version ofmCameras
. -
nmMetaData
Unsafe version ofmMetaData()
. -
nmName
Unsafe version ofmName()
. -
nmNumSkeletons
public static int nmNumSkeletons(long struct) Unsafe version ofmNumSkeletons()
. -
nmSkeletons
Unsafe version ofmSkeletons
. -
nmPrivate
-
nmFlags
public static void nmFlags(long struct, int value) Unsafe version ofmFlags
. -
nmRootNode
Unsafe version ofmRootNode
. -
nmNumMeshes
public static void nmNumMeshes(long struct, int value) Sets the specified value to themNumMeshes
field of the specifiedstruct
. -
nmMeshes
Unsafe version ofmMeshes
. -
nmNumMaterials
public static void nmNumMaterials(long struct, int value) Sets the specified value to themNumMaterials
field of the specifiedstruct
. -
nmMaterials
Unsafe version ofmMaterials
. -
nmNumAnimations
public static void nmNumAnimations(long struct, int value) Sets the specified value to themNumAnimations
field of the specifiedstruct
. -
nmAnimations
Unsafe version ofmAnimations
. -
nmNumTextures
public static void nmNumTextures(long struct, int value) Sets the specified value to themNumTextures
field of the specifiedstruct
. -
nmTextures
Unsafe version ofmTextures
. -
nmNumLights
public static void nmNumLights(long struct, int value) Sets the specified value to themNumLights
field of the specifiedstruct
. -
nmLights
Unsafe version ofmLights
. -
nmNumCameras
public static void nmNumCameras(long struct, int value) Sets the specified value to themNumCameras
field of the specifiedstruct
. -
nmCameras
Unsafe version ofmCameras
. -
nmMetaData
Unsafe version ofmMetaData
. -
nmName
Unsafe version ofmName
. -
nmNumSkeletons
public static void nmNumSkeletons(long struct, int value) Sets the specified value to themNumSkeletons
field of the specifiedstruct
. -
nmSkeletons
Unsafe version ofmSkeletons
. -
nmPrivate
-
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-