4 #include <zerobuf/ConstAllocator.h> 5 #include <zerobuf/Vector.h> 6 #include <zerobuf/Zerobuf.h> 16 typedef std::unique_ptr< const Plane > ConstPlanePtr;
18 class Plane :
public ::zerobuf::Zerobuf
29 std::vector< float > getNormalVector()
const;
43 void setNormal(
const std::vector< float >& value );
44 size_t getNormalSize()
const;
53 void setD(
float value );
56 Plane(
const std::vector< float >& normalValue,
const float& dValue );
59 Plane( const ::zerobuf::Zerobuf& rhs );
60 explicit Plane( ::zerobuf::AllocatorPtr allocator );
62 Plane& operator = (
const Plane& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs );
return *
this; }
66 std::string getSchema()
const final;
67 static std::string ZEROBUF_SCHEMA();
68 std::string getTypeName()
const final {
return "lexis::render::Plane"; }
69 static std::string ZEROBUF_TYPE_NAME() {
return "lexis::render::Plane"; }
70 ::zerobuf::uint128_t getTypeIdentifier()
const final { return ::zerobuf::uint128_t( 0x1dfece2d590fc834ull, 0xdec19a9ee62854bbull ); }
71 static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0x1dfece2d590fc834ull, 0xdec19a9ee62854bbull ); }
72 size_t getZerobufStaticSize()
const final {
return 20; }
73 static size_t ZEROBUF_STATIC_SIZE() {
return 20; }
74 size_t getZerobufNumDynamics()
const final {
return 0; }
75 static size_t ZEROBUF_NUM_DYNAMICS() {
return 0; }
76 static ConstPlanePtr create(
const void* data,
const size_t size ) {
return ConstPlanePtr(
new Plane( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
78 void _parseJSON(
const Json::Value& json )
final;
79 void _createJSON( Json::Value& json )
const final;
83 typedef std::unique_ptr< const ClipPlanes > ConstClipPlanesPtr;
88 typedef ::zerobuf::Vector< Plane > Planes;
95 ClipPlanes::Planes& getPlanes();
96 const ClipPlanes::Planes& getPlanes()
const;
97 std::vector< Plane > getPlanesVector()
const;
104 void setPlanes(
const std::vector< Plane >& value );
106 void compact(
float threshold = 0.1f )
final;
108 ClipPlanes(
const std::vector< Plane >& planesValue );
112 explicit ClipPlanes( ::zerobuf::AllocatorPtr allocator );
114 ClipPlanes& operator = (
const ClipPlanes& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs );
return *
this; }
118 std::string getSchema()
const final;
119 static std::string ZEROBUF_SCHEMA();
120 std::string getTypeName()
const final {
return "lexis::render::ClipPlanes"; }
121 static std::string ZEROBUF_TYPE_NAME() {
return "lexis::render::ClipPlanes"; }
122 ::zerobuf::uint128_t getTypeIdentifier()
const final { return ::zerobuf::uint128_t( 0xd6213c14174f268dull, 0x92dcad32c4fe5f29ull ); }
123 static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0xd6213c14174f268dull, 0x92dcad32c4fe5f29ull ); }
124 size_t getZerobufStaticSize()
const final {
return 20; }
125 static size_t ZEROBUF_STATIC_SIZE() {
return 20; }
126 size_t getZerobufNumDynamics()
const final {
return 1; }
127 static size_t ZEROBUF_NUM_DYNAMICS() {
return 1; }
128 static ConstClipPlanesPtr create(
const void* data,
const size_t size ) {
return ConstClipPlanesPtr(
new ClipPlanes( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
130 void _parseJSON(
const Json::Value& json )
final;
131 void _createJSON( Json::Value& json )
const final;
float * getNormal()
Get a pointer to the float fixed size array object.
void setNormal(float value[3])
Set the value of the float fixed size array object from a float*.
void setD(float value)
Set the value of the float fixed size member.