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.
Layout
struct aiScene { unsigned int
mFlags()
;struct aiNode
*mRootNode()
; unsigned intmNumMeshes()
;struct aiMesh
**mMeshes()
; unsigned intmNumMaterials()
;struct aiMaterial
**mMaterials()
; unsigned intmNumAnimations()
;struct aiAnimation
**mAnimations()
; unsigned intmNumTextures()
;struct aiTexture
**mTextures()
; unsigned intmNumLights()
;struct aiLight
**mLights()
; unsigned intmNumCameras()
;struct aiCamera
**mCameras()
;struct aiMetadata
*mMetaData()
;struct aiString
mName()
; 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
MNAME
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 Deprecated 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.Buffer
calloc(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
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIScene
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIScene
callocStack()
Deprecated.static AIScene.Buffer
callocStack(int capacity)
Deprecated.static AIScene.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIScene
callocStack(org.lwjgl.system.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, org.lwjgl.system.MemoryStack stack)
Returns a newAIScene.Buffer
instance allocated on the specifiedMemoryStack
.static AIScene
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIScene
instance allocated on the specifiedMemoryStack
.static AIScene
mallocStack()
Deprecated.static AIScene.Buffer
mallocStack(int capacity)
Deprecated.static AIScene.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIScene
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.org.lwjgl.PointerBuffer
mAnimations()
The array of animations.AIScene
mAnimations(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themAnimations()
field.org.lwjgl.PointerBuffer
mCameras()
The array of cameras.AIScene
mCameras(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themCameras()
field.int
mFlags()
Any combination of the AI_SCENE_FLAGS_XXX flags.AIScene
mFlags(int value)
Sets the specified value to themFlags()
field.org.lwjgl.PointerBuffer
mLights()
The array of light sources.AIScene
mLights(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themLights()
field.org.lwjgl.PointerBuffer
mMaterials()
The array of materials.AIScene
mMaterials(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMaterials()
field.org.lwjgl.PointerBuffer
mMeshes()
The array of meshes.AIScene
mMeshes(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMeshes()
field.AIMetaData
mMetaData()
The global metadata assigned to the scene itself.AIScene
mMetaData(AIMetaData value)
Sets the address of the specifiedAIMetaData
to themMetaData()
field.AIString
mName()
The name of the scene itself.AIScene
mName(java.util.function.Consumer<AIString> consumer)
Passes themName()
field to the specifiedConsumer
.AIScene
mName(AIString value)
int
mNumAnimations()
The number of animations in the scene.int
mNumCameras()
The number of cameras in the scene.int
mNumLights()
The number of light sources in the scene.int
mNumMaterials()
The number of materials in the scene.int
mNumMeshes()
The number of meshes in the scene.int
mNumTextures()
The number of textures embedded into the fileAINode
mRootNode()
The root node of the hierarchy.AIScene
mRootNode(AINode value)
Sets the address of the specifiedAINode
to themRootNode()
field.org.lwjgl.PointerBuffer
mTextures()
The array of embedded textures.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 AIString
nmName(long struct)
Unsafe version ofmName()
.static void
nmName(long struct, AIString value)
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
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, AIString mName)
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
.
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
MFLAGS, MROOTNODE, MNUMMESHES, MMESHES, MNUMMATERIALS, MMATERIALS, MNUMANIMATIONS, MANIMATIONS, MNUMTEXTURES, MTEXTURES, MNUMLIGHTS, MLIGHTS, MNUMCAMERAS, MCAMERAS, MMETADATA, MNAME, MPRIVATE
The struct member offsets.
-
-
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()
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
@Nullable public AINode 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
@Nullable public org.lwjgl.PointerBuffer 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
@Nullable public org.lwjgl.PointerBuffer 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
@Nullable public org.lwjgl.PointerBuffer 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
@Nullable public org.lwjgl.PointerBuffer 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
@Nullable public org.lwjgl.PointerBuffer 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
@Nullable public org.lwjgl.PointerBuffer 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
@Nullable public AIMetaData 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
public AIString mName()
The name of the scene itself.
-
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.
-
mName
public AIScene mName(java.util.function.Consumer<AIString> consumer)
Passes themName()
field to the specifiedConsumer
.
-
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, AIString mName)
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
@Deprecated public static AIScene mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIScene callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIScene mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIScene callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIScene.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AIScene.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIScene.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AIScene.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static AIScene malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIScene
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AIScene calloc(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
-
malloc
public static AIScene.Buffer malloc(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
-
calloc
public static AIScene.Buffer calloc(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
-
-