Class EcsWorldMemory
java.lang.Object
com.github.elebras1.flecs.EcsWorldMemory
struct {
ecs_entities_memory_t entities;
ecs_component_memory_t components;
ecs_component_index_memory_t component_index;
ecs_query_memory_t queries;
ecs_table_memory_t tables;
ecs_table_histogram_t table_histogram;
ecs_misc_memory_t misc;
ecs_allocator_memory_t allocators;
double collection_time;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentallocators(MemorySegment struct) Getter for field:ecs_allocator_memory_t allocatorsstatic voidallocators(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_allocator_memory_t allocatorsstatic final GroupLayoutLayout for field:ecs_allocator_memory_t allocatorsstatic final longOffset for field:ecs_allocator_memory_t allocatorsstatic MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static doublecollection_time(MemorySegment struct) Getter for field:double collection_timestatic voidcollection_time(MemorySegment struct, double fieldValue) Setter for field:double collection_timestatic final ValueLayout.OfDoubleLayout for field:double collection_timestatic final longOffset for field:double collection_timestatic MemorySegmentcomponent_index(MemorySegment struct) Getter for field:ecs_component_index_memory_t component_indexstatic voidcomponent_index(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_component_index_memory_t component_indexstatic final GroupLayoutLayout for field:ecs_component_index_memory_t component_indexstatic final longOffset for field:ecs_component_index_memory_t component_indexstatic MemorySegmentcomponents(MemorySegment struct) Getter for field:ecs_component_memory_t componentsstatic voidcomponents(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_component_memory_t componentsstatic final GroupLayoutLayout for field:ecs_component_memory_t componentsstatic final longOffset for field:ecs_component_memory_t componentsstatic MemorySegmententities(MemorySegment struct) Getter for field:ecs_entities_memory_t entitiesstatic voidentities(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_entities_memory_t entitiesstatic final GroupLayoutLayout for field:ecs_entities_memory_t entitiesstatic final longOffset for field:ecs_entities_memory_t entitiesstatic final GroupLayoutlayout()The layout of this structstatic MemorySegmentmisc(MemorySegment struct) Getter for field:ecs_misc_memory_t miscstatic voidmisc(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_misc_memory_t miscstatic final GroupLayoutLayout for field:ecs_misc_memory_t miscstatic final longOffset for field:ecs_misc_memory_t miscstatic MemorySegmentqueries(MemorySegment struct) Getter for field:ecs_query_memory_t queriesstatic voidqueries(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_query_memory_t queriesstatic final GroupLayoutLayout for field:ecs_query_memory_t queriesstatic final longOffset for field:ecs_query_memory_t queriesstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static longsizeof()The size (in bytes) of this structstatic MemorySegmenttable_histogram(MemorySegment struct) Getter for field:ecs_table_histogram_t table_histogramstatic voidtable_histogram(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_table_histogram_t table_histogramstatic final GroupLayoutLayout for field:ecs_table_histogram_t table_histogramstatic final longOffset for field:ecs_table_histogram_t table_histogramstatic MemorySegmenttables(MemorySegment struct) Getter for field:ecs_table_memory_t tablesstatic voidtables(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_table_memory_t tablesstatic final GroupLayoutLayout for field:ecs_table_memory_t tablesstatic final longOffset for field:ecs_table_memory_t tables
-
Method Details
-
layout
The layout of this struct -
entities$layout
Layout for field:ecs_entities_memory_t entities -
entities$offset
public static final long entities$offset()Offset for field:ecs_entities_memory_t entities -
entities
Getter for field:ecs_entities_memory_t entities -
entities
Setter for field:ecs_entities_memory_t entities -
components$layout
Layout for field:ecs_component_memory_t components -
components$offset
public static final long components$offset()Offset for field:ecs_component_memory_t components -
components
Getter for field:ecs_component_memory_t components -
components
Setter for field:ecs_component_memory_t components -
component_index$layout
Layout for field:ecs_component_index_memory_t component_index -
component_index$offset
public static final long component_index$offset()Offset for field:ecs_component_index_memory_t component_index -
component_index
Getter for field:ecs_component_index_memory_t component_index -
component_index
Setter for field:ecs_component_index_memory_t component_index -
queries$layout
Layout for field:ecs_query_memory_t queries -
queries$offset
public static final long queries$offset()Offset for field:ecs_query_memory_t queries -
queries
Getter for field:ecs_query_memory_t queries -
queries
Setter for field:ecs_query_memory_t queries -
tables$layout
Layout for field:ecs_table_memory_t tables -
tables$offset
public static final long tables$offset()Offset for field:ecs_table_memory_t tables -
tables
Getter for field:ecs_table_memory_t tables -
tables
Setter for field:ecs_table_memory_t tables -
table_histogram$layout
Layout for field:ecs_table_histogram_t table_histogram -
table_histogram$offset
public static final long table_histogram$offset()Offset for field:ecs_table_histogram_t table_histogram -
table_histogram
Getter for field:ecs_table_histogram_t table_histogram -
table_histogram
Setter for field:ecs_table_histogram_t table_histogram -
misc$layout
Layout for field:ecs_misc_memory_t misc -
misc$offset
public static final long misc$offset()Offset for field:ecs_misc_memory_t misc -
misc
Getter for field:ecs_misc_memory_t misc -
misc
Setter for field:ecs_misc_memory_t misc -
allocators$layout
Layout for field:ecs_allocator_memory_t allocators -
allocators$offset
public static final long allocators$offset()Offset for field:ecs_allocator_memory_t allocators -
allocators
Getter for field:ecs_allocator_memory_t allocators -
allocators
Setter for field:ecs_allocator_memory_t allocators -
collection_time$layout
Layout for field:double collection_time -
collection_time$offset
public static final long collection_time$offset()Offset for field:double collection_time -
collection_time
Getter for field:double collection_time -
collection_time
Setter for field:double collection_time -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-