11 #ifndef __GEO_PrimCamera__
12 #define __GEO_PrimCamera__
49 bool dry_run=
false)
override;
51 bool dry_run=
false)
override;
60 unsigned dv = 0)
const override;
93 void assignVertex(
GA_Offset new_vtx,
bool update_topology);
102 void stashed(
bool beingstashed,
143 sopen = mySettings.shutteropen;
144 sclose = mySettings.shutterclose;
150 mySettings.shutterclose );
155 const char *getProjectionToken()
const;
166 rx = mySettings.resx;
167 ry = mySettings.resy;
172 return mySettings.resx;
177 return mySettings.resy;
183 mySettings.cropy[0], mySettings.cropy[1]);
193 xmin = mySettings.cropx[0];
194 ymin = mySettings.cropy[0];
204 xmax = mySettings.cropx[1];
205 ymax = mySettings.cropy[1];
210 cropmin.
x() = mySettings.cropx[0];
211 cropmin.
y() = mySettings.cropy[0];
212 cropmax.
x() = mySettings.cropx[1];
213 cropmax.
y() = mySettings.cropy[1];
220 mySettings.winy[0], mySettings.winy[1]);
230 xmin = mySettings.winx[0];
231 ymin = mySettings.winy[0];
241 xmax = mySettings.winx[1];
242 ymax = mySettings.winy[1];
247 winmin.
x() = mySettings.winx[0];
248 winmin.
y() = mySettings.winy[0];
249 winmax.
x() = mySettings.winx[1];
250 winmax.
y() = mySettings.winy[1];
261 n = mySettings.clipnear;
262 f = mySettings.clipfar;
292 mySettings.resx = resolution.
x();
293 mySettings.resy = resolution.
y();
298 mySettings.resx = rx;
299 mySettings.resy = ry;
304 mySettings.resx = rx;
309 mySettings.resy = ry;
314 mySettings.shutteropen = stime.
x();
315 mySettings.shutterclose = stime.
y();
320 mySettings.shutteropen = sopen;
321 mySettings.shutterclose = sclose;
326 mySettings.shutteropen = sopen;
331 mySettings.shutterclose = sclose;
336 mySettings.clipnear = planes.
x();
337 mySettings.clipfar = planes.
y();
341 mySettings.clipnear =
n;
342 mySettings.clipfar =
f;
346 mySettings.clipnear =
n;
350 mySettings.clipfar =
f;
355 mySettings.projection = projection;
360 mySettings.cropx[0] = xmin;
361 mySettings.cropy[0] = ymin;
366 mySettings.cropx[0] = xymin.
x();
367 mySettings.cropy[0] = xymin.
y();
372 mySettings.cropx[1] = xmax;
373 mySettings.cropy[1] = ymax;
378 mySettings.cropx[1] = xymax.
x();
379 mySettings.cropy[1] = xymax.
y();
384 mySettings.winx[0] = xmin;
385 mySettings.winy[0] = ymin;
390 mySettings.winx[0] = xymin.
x();
391 mySettings.winy[0] = xymin.
y();
396 mySettings.winx[1] = xmax;
397 mySettings.winy[1] = ymax;
402 mySettings.winx[1] = xymax.
x();
403 mySettings.winy[1] = xymax.
y();
void setImagingDistance(const fpreal value)
void setShutter(const UT_Vector2T< fpreal > &stime)
~GEO_PrimCamera() override
Definition of a geometry attribute.
void setShutter(const fpreal sopen, const fpreal sclose)
virtual GEO_Primitive * copy(int preserve_shared_pts=0) const
SYS_FORCE_INLINE GA_Offset getPointOffset(GA_Size i) const
void setShutterOpen(const fpreal sopen)
void setCropMin(const fpreal xmin, const fpreal ymin)
virtual UT_Vector3 baryCenter() const
virtual void copyPrimitive(const GEO_Primitive *src)=0
void setGuideScale(const fpreal value)
void setFstop(const fpreal value)
void setCropMax(const UT_Vector2T< fpreal > &xymax)
const UT_CameraParms & getParms() const
fpreal getPixelAspect() const
void setWindowMax(const fpreal xmax, const fpreal ymax)
void setResolutionX(const exint rx)
SYS_FORCE_INLINE GA_Index getVertexIndex(GA_Size primvertexnum) const
virtual UT_Vector3D computeNormalD() const =0
void setCropMin(const UT_Vector2T< fpreal > &xymin)
virtual void copySubclassData(const GA_Primitive *source)
GLsizei const GLfloat * value
const UT_Vector4T< fpreal > getCrop() const
Crop.
bool enlargeBoundingBox(UT_BoundingRect &b, const GA_Attribute *p) const override
SYS_FORCE_INLINE GA_Index getPointIndex() const
The fast point index accessor.
const UT_Vector2T< fpreal > getCropMax() const
void setPosition(const UT_Vector3D &pos)
void getClippingPlanes(fpreal &n, fpreal &f) const
SYS_FORCE_INLINE void setPointOffset(GA_Size i, GA_Offset ptoff)
void getWindowMin(fpreal &xmin, fpreal &ymin) const
void getCropMax(fpreal &xmax, fpreal &ymax) const
fpreal getNearClippingPlane() const
void getWindow(UT_Vector2T< fpreal > &winmin, UT_Vector2T< fpreal > &winmax)
const UT_Vector2T< fpreal > getShutter() const
virtual GA_DereferenceStatus dereferencePoint(GA_Offset point, bool dry_run=false)=0
void reverse() override=0
Reverse the order of vertices.
#define GA_DECLARE_INTRINSICS(OVERRIDE)
void setPixelAspect(const fpreal value)
Abstract base class for a range membership query object.
const UT_OptionsHolder & getMetadata() const
Metadata.
UT_Vector3D getPosition() const
void setFocal(const fpreal value)
fpreal getImagingDistance() const
virtual UT_Vector3 computeNormal() const =0
Return a normal vector for the primitive.
#define GA_INVALID_OFFSET
virtual bool isDegenerate() const =0
Is the primitive degenerate.
constexpr SYS_FORCE_INLINE T & x() noexcept
SYS_FORCE_INLINE UT_Vector3 getPos3(GA_Size i) const
const UT_Vector2T< fpreal > getCropMin() const
virtual void setLocalTransform(const UT_Matrix3D &matrix)
Set the local transform. The default implementation does nothing.
void getWindowMax(fpreal &xmax, fpreal &ymax) const
void setOrthoZoom(const fpreal value)
void getCrop(UT_Vector2T< fpreal > &cropmin, UT_Vector2T< fpreal > &cropmax)
void setResolutionY(const exint ry)
void setCropMax(const fpreal xmax, const fpreal ymax)
const UT_Vector2T< fpreal > getWindowMax() const
OBJ_ProjectionType getProjection() const
Projection.
void setClippingPlanes(const UT_Vector2T< fpreal > &planes)
virtual const GA_PrimitiveJSON * getJSON() const =0
void setMetadata(const UT_OptionsHolder &opts)
GLsizei GLsizei GLchar * source
SYS_FORCE_INLINE GA_Offset getVertexOffset() const
The fast vertex offset accessor.
Provide a JSON interface to a primitive.
fpreal getFocusDistance() const
A handle to simplify manipulation of multiple attributes.
fpreal getFarClippingPlane() const
exint getResolutionX() const
SYS_FORCE_INLINE GA_Offset getPointOffset() const
The fast point offset accessor.
HUSD_API const char * resolution()
SYS_FORCE_INLINE void setPointOffset(GA_Offset ptoff)
fpreal getShutterOpen() const
Shutter.
bool isOrthographic() const
GLboolean GLboolean GLboolean b
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
void getResolution(exint &rx, exint &ry) const
virtual GA_DereferenceStatus dereferencePoints(const GA_RangeMemberQuery &pt_q, bool dry_run=false)=0
exint getResolutionY() const
SYS_FORCE_INLINE GA_Index getVertexIndex() const
The fast vertex index accessor.
fpreal getOrthoZoom() const
SYS_FORCE_INLINE GA_Index getPointIndex(GA_Size i) const
SYS_FORCE_INLINE void setPos3(GA_Size i, const UT_Vector3 &pos) const
void setAperture(const fpreal value)
void setNearClippingPlane(const fpreal n)
void setClippingPlanes(const fpreal n, const fpreal f)
void setResolution(const UT_Vector2T< exint > &resolution)
virtual void transform(const UT_Matrix4 &)
virtual void getLocalTransform(UT_Matrix3D &matrix) const
fpreal getAperture() const
SYS_FORCE_INLINE void setVertexPoint(GA_Offset pt)
void setWindowMin(const fpreal xmin, const fpreal ymin)
GA_API const UT_StringHolder parms
virtual int detachPoints(GA_PointGroup &grp)=0
void getCropMin(fpreal &xmin, fpreal &ymin) const
void setWindowMax(const UT_Vector2T< fpreal > &xymax)
virtual bool getBBox(UT_BoundingBox *bbox) const =0
void setFarClippingPlane(const fpreal f)
const UT_Vector4T< fpreal > getWindow() const
Window.
fpreal getGuideScale() const
const UT_Vector2T< fpreal > getWindowMin() const
SYS_FORCE_INLINE GA_Offset getVertexOffset(GA_Size primvertexnum) const
const UT_Matrix3D & getTransform() const
virtual bool evaluatePointRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map, fpreal u, fpreal v=0, uint du=0, uint dv=0) const =0
Container class for all geometry.
void setResolution(const exint rx, const exint ry)
fpreal getShutterClose() const
const UT_Vector2T< exint > getResolution() const
Resolution.
void getShutter(fpreal &sopen, fpreal &sclose) const
void setShutterClose(const fpreal sclose)
void setTransform(const UT_Matrix3D &xform)
void setFocusDistance(const fpreal value)
const UT_Vector2T< fpreal > getClippingPlanes() const
Clipping Planes.
virtual int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const
virtual void stashed(bool beingstashed, GA_Offset offset=GA_INVALID_OFFSET)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setWindowMin(const UT_Vector2T< fpreal > &xymin)
void setProjection(const OBJ_ProjectionType projection)