Bifrost SDK
Bifrost SDK documentation
GeometryTypes.h
Go to the documentation of this file.
1//-
2//*****************************************************************************
3// Copyright (c) 2024 Autodesk, Inc.
4// All rights reserved.
5//
6// Use of this software is subject to the terms of the Autodesk license
7// agreement provided at the time of installation or download, or which
8// otherwise accompanies this software in either electronic or hard copy form.
9// =============================================================================
10//+
11
12//
17
18#ifndef BIFROST_GEOMETRY_TYPES_H
19#define BIFROST_GEOMETRY_TYPES_H
20
22
23#include <Amino/Core/internal/ConfigMacros.h>
24#include <Amino/Cpp/Annotate.h>
25
26#include <Amino/Core/Array.h>
27#include <Amino/Core/Ptr.h>
28#include <Bifrost/Math/Types.h>
29
30#define BIFROST_IGNORE_NAMESPACE AMINO_ANNOTATE("Amino::Namespace ignore")
32#undef BIFROST_IGNORE_NAMESPACE
33
34namespace Simulation {
36enum class AMINO_ANNOTATE("Amino::Enum")
37 RateType : int {
40 };
41
42struct AMINO_ANNOTATE("Amino::Struct") Time {
43 long long ticks;
44 double time;
45 double frame;
46 double frameLength;
47};
48
49struct AMINO_ANNOTATE("Amino::Struct") TimelineInfo {
50 double startFrame;
51 double endFrame;
52 double minFrame;
53 double maxFrame;
54 double frameStep;
56};
57
58} // namespace Simulation
59
60namespace Geometry {
61
62namespace Common {
63
64// To add a new geometry type:
65// - Add an element to this enum
66// - Add populateXyz and getXyzPrototype methods to GeoProperty.h
67// - Add the type to Bifrost::Geometry::getGeometryTypes()
68// - Update get_geo_schema_type to add a case for the new type
69// - Update switch_is_a to use this new case.
70// - Update all compounds using switch_is_a to do the right thing for the new
71// type.
72// (could be a simple passthrough by default.)
73
74enum class
75 AMINO_ANNOTATE("Amino::Enum")
76GeometryType : int {
77 not_a_geometry = 0,
78 volume,
79 instances,
80 mesh,
81 strands,
82 points
83};
84
118struct AMINO_ANNOTATE(
122
124 unsigned int index{};
125
128 Bifrost::Math::uint4 sub_indices{};
129
132 Bifrost::Math::float4 sub_parameters{};
133
134 /*@cond true*/
135 AMINO_INTERNAL_WARNING_PUSH
136 AMINO_INTERNAL_WARNING_DISABLE_MSC(4251)
137 /*@endcond*/
138
139
140 Amino::Ptr<Amino::Array<unsigned int>> aux_indices{Amino::PtrDefaultFlag{}};
143
144 /*@cond true*/
145 AMINO_INTERNAL_WARNING_POP
146 /*@endcond*/
147
148 bool operator==(const GeoLocation& other) const;
149 bool operator!=(const GeoLocation& other) const {
150 return !(*this == other);
151 }
152};
153
155enum class
156 AMINO_ANNOTATE("Amino::Enum")
157Adaptivity : int
158{
159 Automatic,
161 Off
162};
165enum class AMINO_ANNOTATE("Amino::Enum") DataInterpolationMode : int {
166 Nearest = 0,
167 Linear,
169};
170
171} // Common
172
173namespace Mesh {
174
178struct AMINO_ANNOTATE(
180 unsigned int face;
181 unsigned int side;
182
183 bool operator==(const FaceEdge& other) const;
184};
185} // namespace Mesh
186
187// BIFROST-4034 - Hide ports that are not yet needed in the graph_space node
188// design
189/*@cond true*/
190#define BIFROST_WANT_FULL_GRAPH_TRANSFORM_FUNCTIONALITY 0
191/*@endcond*/
192namespace Transform {
193struct
194 AMINO_ANNOTATE("Amino::Struct") BIFROST_GEOMETRY_DECL
197#if BIFROST_WANT_FULL_GRAPH_TRANSFORM_FUNCTIONALITY
198 Bifrost::Math::float4x4 parentTransform;
199 Bifrost::Math::float4x4 localTransform;
200#endif
201};
202} // namespace Transform
203
204namespace Query {
206enum AMINO_ANNOTATE("Amino::Enum")
207 SamplerType : int {
210 kCubicC1
211 };
212} // namespace Query
213
214} // Geometry
215} // Bifrost
216
217#endif // BIFROST_GEOMETRY_TYPES_H
A resizable container of contiguous elements.
Smart pointers used to allow custom user classes (opaque classes) to be used within Amino graphs....
Header Parser Annotation Macro & Parser Documentation.
Definition of macros for symbol visibility.
#define BIFROST_GEOMETRY_DECL
#define BIFROST_IGNORE_NAMESPACE
Definition: GeometryTypes.h:30
Definition: HostData.h:33
Ptr(MutablePtr< T >) -> Ptr< T >
Deduction guide for Ptr.
Definition: FCurve.h:35
RateType
Rate types available for scale_rate_to_time_step.
Definition: GeometryTypes.h:37
Adaptivity
Specifies the detail size mode to use.
@ Automatic
How this works is context dependent.
@ VariedFromProperty
Use a detail size that varies according to the specified voxel property.
@ Off
Use a uniform detail size.
@ DefaultValue
No interpolation, use the default value specified in the geo property.
@ Nearest
Nearest neighbor interpolation.
SamplerType
Defines an interpolation mode.
@ kLinear
Linear interpolation.
@ kCubicC0
Piecewise cubic interpolation with C0 continuity.
@ kCubicC1
Piecewise cubic interpolation with C1 continuity.
Flag that may be passed when creating a Ptr, to make it contain a default value as its pointee.
Definition: Ptr.h:124
Smart pointers allowing custom user classes (opaque classes) to be used within Amino graphs.
Definition: Ptr.h:207
A vector of four floats, x, y, z and w.
Definition: Types.h:108
A matrix with four columns and four rows of floats.
Definition: Types.h:180
A vector of four unsigned ints, x, y, z and w.
Definition: Types.h:876
double frameLength
Length of a frame in seconds.
Definition: GeometryTypes.h:46
double time
Time in seconds.
Definition: GeometryTypes.h:44
long long ticks
Number of ticks, based on Maya's definition of ticks.
Definition: GeometryTypes.h:43
double frame
Frame number - can be fractional.
Definition: GeometryTypes.h:45
double endFrame
The last frame of the time slider from the host.
Definition: GeometryTypes.h:51
double maxFrame
The last frame of the range slider from the host.
Definition: GeometryTypes.h:53
double startFrame
The first frame of the time slider from the host.
Definition: GeometryTypes.h:50
double minFrame
The first frame of the range slider from the host.
Definition: GeometryTypes.h:52
Describes a location within, or on the surface of, a geometry.
bool operator!=(const GeoLocation &other) const
bool operator==(const GeoLocation &other) const
Describes a half-edge within a face of a mesh.
bool operator==(const FaceEdge &other) const
unsigned int face
The index of the face that is referenced by this FaceEdge.
unsigned int side
The side within the face that is referenced by this FaceEdge. Side 0 is defined as the edge between f...
Bifrost::Math::float4x4 totalTransform
The total transform of the graph node.