Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
animkeybuffer.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
12
#include "
core/refcounted.h
"
13
#include "
timing/time.h
"
14
15
//------------------------------------------------------------------------------
16
namespace
CoreAnimation
17
{
18
class
AnimKeyBuffer
:
public
Core::RefCounted
19
{
20
__DeclareClass
(
AnimKeyBuffer
);
21
public
:
22
struct
Interval
23
{
24
Timing::Tick
start
,
end
;
25
uint
key0
,
key1
;
26
float
duration
;
27
};
28
30
AnimKeyBuffer
();
32
virtual
~AnimKeyBuffer
();
34
void
Setup
(
SizeT
numIntervals
,
SizeT
numKeys
,
void
* intervalPtr,
void
* keyPtr);
36
void
Discard
();
38
bool
IsValid
()
const
;
40
SizeT
GetNumKeys
()
const
;
42
SizeT
GetByteSize
()
const
;
44
const
float
*
GetKeyBufferPointer
()
const
;
46
const
AnimKeyBuffer::Interval
*
GetIntervalBufferPointer
()
const
;
47
48
private
:
49
SizeT
numKeys
;
50
SizeT
numIntervals
;
51
uint
mapCount
;
52
float
*
keyBuffer
;
53
AnimKeyBuffer::Interval
*
intervalBuffer
;
54
};
55
56
//------------------------------------------------------------------------------
59
inline
bool
60
AnimKeyBuffer::IsValid
()
const
61
{
62
return
(0 != this->
intervalBuffer
);
63
}
64
65
//------------------------------------------------------------------------------
68
inline
SizeT
69
AnimKeyBuffer::GetNumKeys
()
const
70
{
71
return
this->
numKeys
;
72
}
73
74
//------------------------------------------------------------------------------
77
inline
SizeT
78
AnimKeyBuffer::GetByteSize
()
const
79
{
80
return
this->
numKeys
*
sizeof
(float);
81
}
82
83
//------------------------------------------------------------------------------
86
inline
const
float
*
87
AnimKeyBuffer::GetKeyBufferPointer
()
const
88
{
89
return
this->
keyBuffer
;
90
}
91
92
//------------------------------------------------------------------------------
95
inline
const
AnimKeyBuffer::Interval
*
96
AnimKeyBuffer::GetIntervalBufferPointer
()
const
97
{
98
return
this->
intervalBuffer
;
99
}
100
101
}
// namespace CoreAnimation
102
//------------------------------------------------------------------------------
103
Core::RefCounted
The common base class of Nebula.
Definition
refcounted.h:38
CoreAnimation::AnimKeyBuffer::IsValid
bool IsValid() const
return true if the object has been setup
Definition
animkeybuffer.h:60
CoreAnimation::AnimKeyBuffer::GetNumKeys
SizeT GetNumKeys() const
get number of keys in buffer
Definition
animkeybuffer.h:69
CoreAnimation::AnimKeyBuffer::Discard
void Discard()
discard the buffer
Definition
animkeybuffer.cc:59
CoreAnimation::AnimKeyBuffer::~AnimKeyBuffer
virtual ~AnimKeyBuffer()
destructor
Definition
animkeybuffer.cc:31
CoreAnimation::AnimKeyBuffer::GetIntervalBufferPointer
const AnimKeyBuffer::Interval * GetIntervalBufferPointer() const
get direct pointer to interval buffer
Definition
animkeybuffer.h:96
CoreAnimation::AnimKeyBuffer::AnimKeyBuffer
AnimKeyBuffer()
constructor
Definition
animkeybuffer.cc:18
CoreAnimation::AnimKeyBuffer::mapCount
uint mapCount
Definition
animkeybuffer.h:51
CoreAnimation::AnimKeyBuffer::__DeclareClass
__DeclareClass(AnimKeyBuffer)
CoreAnimation::AnimKeyBuffer::Setup
void Setup(SizeT numIntervals, SizeT numKeys, void *intervalPtr, void *keyPtr)
setup the buffer
Definition
animkeybuffer.cc:43
CoreAnimation::AnimKeyBuffer::numKeys
SizeT numKeys
Definition
animkeybuffer.h:49
CoreAnimation::AnimKeyBuffer::GetByteSize
SizeT GetByteSize() const
get buffer size in bytes
Definition
animkeybuffer.h:78
CoreAnimation::AnimKeyBuffer::intervalBuffer
AnimKeyBuffer::Interval * intervalBuffer
Definition
animkeybuffer.h:53
CoreAnimation::AnimKeyBuffer::GetKeyBufferPointer
const float * GetKeyBufferPointer() const
Get direct pointer to keys.
Definition
animkeybuffer.h:87
CoreAnimation::AnimKeyBuffer::numIntervals
SizeT numIntervals
Definition
animkeybuffer.h:50
CoreAnimation::AnimKeyBuffer::keyBuffer
float * keyBuffer
Definition
animkeybuffer.h:52
CoreAnimation
An animation resource holds a set of animations from a loaded NAX file.
Definition
charactercontext.h:40
Timing::Tick
int Tick
the tick datatype (one tick == 1 millisecond)
Definition
time.h:20
refcounted.h
CoreAnimation::AnimKeyBuffer::Interval
Definition
animkeybuffer.h:23
CoreAnimation::AnimKeyBuffer::Interval::key0
uint key0
Definition
animkeybuffer.h:25
CoreAnimation::AnimKeyBuffer::Interval::key1
uint key1
Definition
animkeybuffer.h:25
CoreAnimation::AnimKeyBuffer::Interval::end
Timing::Tick end
Definition
animkeybuffer.h:24
CoreAnimation::AnimKeyBuffer::Interval::start
Timing::Tick start
Definition
animkeybuffer.h:24
CoreAnimation::AnimKeyBuffer::Interval::duration
float duration
Definition
animkeybuffer.h:26
time.h
Typedefs for the Timing subsystem.
SizeT
int SizeT
Definition
types.h:42
uint
unsigned int uint
Definition
types.h:33
code
render
coreanimation
animkeybuffer.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.