|
HDK
|
#include <IMX_Layer.h>
Inheritance diagram for IMX_Layer:Public Member Functions | |
| IMX_Layer () | |
| IMX_Layer (const IMX_Layer &a, bool) | |
| "copy constructor" that does not copy the buffer pixels More... | |
| IMX_Layer (int width, int height, CE_Image::StorageType storage, int channels) | |
| Initialize the IMX_Buffer. More... | |
| IMX_Layer (const PXL_Raster &rp) | |
| Construct a layer from a PXL_Raster. More... | |
| bool | save (std::ostream &os) const |
| Returns true for successful save. More... | |
| bool | saveJSON (UT_JSONWriter &w) const |
| void | copyMetadataToOptions (UT_Options &opt) const |
| void | updateMetadataFromOptions (const UT_Options &opt) |
| Load ourselves from the options, ignoring fields we don't know. More... | |
| const UT_DimRect & | dataWindow () const |
| The dataWindow surrounds all the pixels. More... | |
| int | x () const |
| int | y () const |
| UT_Vector2I | xy () const |
| int | width () const |
| int | height () const |
| UT_Vector2I | wh () const |
| int | r () const |
| int | t () const |
| UT_Vector2I | rt () const |
| fpreal64 | pixelAspectRatio () const |
| Distortion in image->pixel space transform. More... | |
| UT_Vector3D | voxelSize () const |
| World space voxel size, where xy is the pixel size and z is max(x,y). More... | |
| const UT_Vector2D & | displayWindowSize () const |
| Aperture in pixels. More... | |
| UT_Vector2D | displayWindowXY () const |
| UT_Vector2D | displayWindowRT () const |
| fpreal64 | apertureAspect () const |
| width / height of the aperture / displayWindow More... | |
| IMX_Projection | projection () const |
| Camera. More... | |
| bool | isOrtho () const |
| bool | isPerspective () const |
| fpreal64 | apertureMax () const |
| fpreal64 | focalLength () const |
| fpreal64 | fStop () const |
| fpreal64 | lensDiameter () const |
| const UT_Vector2D & | clippingRange () const |
| fpreal64 | focusDistance () const |
| const UT_Vector3D & | cameraPosition () const |
| fpreal64 | cameraZ () const |
| fpreal64 | imagingDist () const |
| fpreal64 | guideScale () const |
| const UT_Vector2D & | shutter () const |
| void | getCameraParms (UT_CameraParms &cam_parms, UT_Matrix4D &xform) const |
| void | setCameraParms (const UT_CameraParms &cam_parms, const UT_Matrix4D &xform) |
| UT_Matrix4D | projectionXform () const |
| Transform from camera space to image space. More... | |
| UT_Matrix4D | projectionXformVk () const |
| Transform from camera space to texture space for Vulkan rasterization. More... | |
| UT_Matrix4D | baseTransform () const |
| Transform from image space to world space. More... | |
| UT_Matrix4D | transform () const |
| UT_Matrix4D | imageToWorldXform () const |
| UT_Matrix4D | inverseCameraXform () const |
| const UT_Vector2D & | imageToPixelScale () const |
| Coordinate transforms. More... | |
| const UT_Vector2D & | imageToPixelTranslate () const |
| const UT_Vector2D & | bufferToPixelScale () const |
| UT_Vector2D | bufferToTextureScale () const |
| UT_Vector2D | bufferToLocalScale () const |
| UT_Vector2D | textureToBufferScale () const |
| const UT_Vector2D & | pixelScale () const |
| bool | isPixelScale () const |
| const UT_Vector2D & | bufferToPixelTranslate () const |
| UT_Vector2D | imageToBufferScale () const |
| UT_Vector2D | imageToBufferTranslate () const |
| UT_Vector2D | bufferPixelSize () const |
| UT_Vector2D | imageToPixel (const UT_Vector2D &v) const |
| Image <-> Pixel. More... | |
| UT_Vector2D | pixelToImage (const UT_Vector2D &v) const |
| UT_Vector2D | pixelToBuffer (const UT_Vector2D &v) const |
| Pixel <-> Buffer. More... | |
| UT_Vector2D | bufferToPixel (const UT_Vector2D &v) const |
| UT_Vector2D | imageToBuffer (const UT_Vector2D &v) const |
| Image <-> Buffer. More... | |
| UT_Vector2D | bufferToImage (const UT_Vector2D &v) const |
| UT_Vector2D | bufferToTexture (const UT_Vector2D &v) const |
| UT_Vector2D | textureToBuffer (const UT_Vector2D &v) const |
| UT_Vector2D | imageToTexture (const UT_Vector2D &v) const |
| UT_Vector2D | textureToImage (const UT_Vector2D &v) const |
| UT_Vector2D | textureToPixel (const UT_Vector2D &v) const |
| UT_Vector2D | pixelToTexture (const UT_Vector2D &v) const |
| UT_Vector3D | imageToWorld (const UT_Vector2D &v) const |
| UT_Vector2D | worldToImage (const UT_Vector3D &v) const |
| UT_Vector3D | image3ToWorld (const UT_Vector3D &v) const |
| UT_Vector3D | worldToImage3 (const UT_Vector3D &v) const |
| UT_Vector3D | imageToLocal (const UT_Vector2D &v) const |
| UT_Vector2D | localToImage (const UT_Vector3D &v) const |
| UT_Vector3D | image3ToLocal (const UT_Vector3D &v) const |
| UT_Vector3D | localToImage3 (const UT_Vector3D &v) const |
| UT_Vector3D | localToWorld (const UT_Vector3D &v) const |
| UT_Vector3D | worldToLocal (const UT_Vector3D &v) const |
| UT_Matrix4D | bufferUVToWorldXform (fpreal *taper=nullptr) const |
| void | setBufferUVToWorldXform (UT_Matrix4D xform, fpreal taper) |
| template<typename T > | |
| void | initFromVoxels (const UT_VoxelArray< T > &src, bool data_too) |
| void | setDefault () |
| Modifications to layer metadata, in approximate order you call them. More... | |
| void | setCanonical () |
| void | copyMetadata (const IMX_Layer &a) |
| void | setPixelAspectRatio (fpreal64 pa) |
| Set pixel aspect ratio. This must be done before setDataWindow. More... | |
| void | setDataWindow (int w, int h) |
| Set both dataWindow and displayWindow to the same rectangle. More... | |
| void | setDataWindow (int x, int y, int w, int h) |
| void | setDataWindowOnly (int x, int y, int w, int h) |
| Set dataWindow w/o changing displayWindow. More... | |
| void | setDisplayWindow (int w, int h) |
| Set the displayWindow w/o changing dataWindow. More... | |
| void | setDisplayWindow (int x, int y, int w, int h) |
| void | setDisplayWindow (const UT_Vector2D &xy, const UT_Vector2D &wh) |
| void | setDisplayWindow (const UT_DimRect &rect) |
| void | translatePixelOrigin (int dx, int dy) |
| void | setApertureAspect (int n, int d) |
| void | setApertureAspect (fpreal64 a) |
| void | setProjection (IMX_Projection p) |
| void | setOrtho () |
| void | setPerspective () |
| void | setCameraPosition (const UT_Vector3D &p) |
| void | setCameraZ (fpreal64 z) |
| void | setImagingDist (fpreal64 z) |
| void | setAperture (fpreal64 mm) |
| void | setApertureOffset (const UT_Vector2D &p) |
| void | setApertureCenter (const UT_Vector2D &p) |
| void | setFocalLength (fpreal64 mm) |
| void | setFStop (fpreal64 f) |
| void | setLensDiameter (fpreal64 mm) |
| void | setClippingRange (const UT_Vector2D &v) |
| void | setFocusDistance (fpreal64 f) |
| void | setShutter (const UT_Vector2D &v) |
| void | setGuideScale (fpreal64 scale) |
| void | setBaseTransform (const UT_Matrix4D &m) |
| set the imageToWorld transform. This can be done at any time More... | |
| void | transform (const UT_Matrix4D &m) |
| void | preTransform (const UT_Matrix4D &m) |
| void | setImageToWorldXform (const UT_Matrix4D &m) |
| void | setInverseCameraXform (const UT_Matrix4D &m) |
| void | setBufferSize (int w, int h) |
| void | setPixelScale (const UT_Vector2D &) |
| void | setBufferToPixels () |
| void | setAligned (const IMX_Layer &src) |
| void | setBufferToPixelScale (const UT_Vector2D &p) |
| void | setBufferToPixelTranslate (const UT_Vector2D &p) |
| void | setProperties (const UT_OptionsHolder &props) |
| UT_OptionsHolder | properties () const |
| template<typename OP > | |
| void | updateProperties (const OP &op) |
| void | setIsMetadataOnly (bool v) |
| bool | isMetadataOnly () const |
| fpreal64 | computeMin (int channel=0) const |
| fpreal64 | computeMax (int channel=0) const |
| fpreal64 | computeMinLength () const |
| fpreal64 | computeMaxLength () const |
| fpreal64 | computeAverage (int channel=0) const |
| exint | computeMinI (int channel=0) const |
| exint | computeMaxI (int channel=0) const |
Public Member Functions inherited from IMX_Buffer | |
| IMX_Buffer () | |
| Creates a new buffer. You must call setSize to make this buffer usable. More... | |
| IMX_Buffer (int width, int height, CE_Image::StorageType storage, int channels) | |
| Create and call setSize. More... | |
| IMX_Buffer (const IMX_Buffer &other) | |
| IMX_Buffer (IMX_Buffer &&other) noexcept | |
| IMX_Buffer (const PXL_Raster &rp) | |
| ~IMX_Buffer () override | |
| EntryType | poolTypeID () const override |
| void | copyMetadata (const IMX_Buffer &source) |
| void | copyStorageType (const IMX_Buffer &i) |
| Set storesIntegers, isFixedPoint, bytes, channels. More... | |
| void | setStorageType (CE_Image::StorageType storage, int channels) |
| Set storesIntegers, isFixedPoint, bytes, channels. More... | |
| void | setStorageType (CE_Image::StorageType storage) |
| Set storesIntegers, isFixedPoint, bytes. More... | |
| void | setStorageBytes (int) |
| void | setStorageBytes (int, bool) |
| void | setChannels (int channels) |
| Set channels, don't change storesIntegers, isFixedPoint, or bytes. More... | |
| CE_Image::StorageType | getStorageType () const |
| Get the data type used to store pixel data for each channel. More... | |
| bool | storesIntegers () const |
| Does this buffer store integers? More... | |
| bool | isFixedPoint () const |
| Does this buffer use fixed point to store non-integer data? More... | |
| int | getChannels () const |
| Get the number of channels per pixel. More... | |
| int | getStorageBytes () const |
| Number of bytes per channel. More... | |
| void | setBufferSize (int width, int height) |
| Sets size of this buffer. More... | |
| exint | bufferWidth () const |
| Get width (number of columns in a row) of the buffer. More... | |
| exint | bufferHeight () const |
| Get height (number of rows) of the buffer. More... | |
| int64 | getBufferSize () const |
| Returns the number of bytes required to store the entire buffer. More... | |
| void | setBufferXforms (const UT_Vector2F &buffer_to_image_scale, const UT_Vector2F &buffer_to_image_xlate, const UT_Vector2F &buffer_from_image_scale, const UT_Vector2F &buffer_from_image_xlate, const UT_Vector2F &buffer_to_pixel_scale, const UT_Vector2F &buffer_to_pixel_xlate, const UT_Matrix4F &image_to_world, const UT_Matrix4F &world_to_image, const UT_Matrix4F &camera_to_world, const UT_Vector3F &camera_image_pos) |
| Set transform between image and buffer space. More... | |
| void | setBorder (IMX_BorderType border) |
| Sets the border type of this image. Constant means it is zero. More... | |
| IMX_BorderType | getBorderType () const |
| Returns type of the border. More... | |
| void | setTypeInfo (IMX_TypeInfo typeinfo) |
| Sets the semantic type info of this image. More... | |
| IMX_TypeInfo | getTypeInfo () const |
| Returns the semantic type. More... | |
| void | setStatProjection (IMX_Projection projection) |
| IMX_Projection | statProjection () const |
| Returns the projection type. More... | |
| void | setDefaultColor (const UT_Vector4F &) |
| UT_Vector4F | getDefaultColor () const |
| UT_Vector4I | getDefaultColorI () const |
| return the current integer value, which might be different More... | |
| void | copy (const IMX_Buffer &other) |
| IMX_Buffer & | operator= (const IMX_Buffer &other) |
| void | deepCopy (const IMX_Buffer &other) |
| void | swap (IMX_Buffer &other) |
| IMX_Buffer & | operator= (IMX_Buffer &&other) |
| bool | stealable () const |
| void | setStealable (bool v) const |
| bool | isAligned (const IMX_Buffer &src) const |
| True if the buffer pixels line up: width and the transforms from image space match. More... | |
| void | copyBuffer (const IMX_Buffer &other) |
| Only copy the buffer pointers, the stat data is left unchanged. More... | |
| void | moveBuffer (IMX_Buffer &src) |
| Move the buffer to this from src, src is left dirty. More... | |
| void | makeBufferUnique () |
| void | adoptRaster (PXL_Raster &raster, bool convert_colorspace) |
| void | copyOrConvert (const IMX_Buffer &other) |
| bool | extract (void *dst, exint dstsize, CE_Image::StorageType dststorage, int dstchannels) const |
| bool | insert (const void *src, exint srcsize, CE_Image::StorageType srcstorage, int srcchannels) |
| UT_UniquePtr< TIL_Raster > | buildRaster () const |
| const UT_SharedPtr < CE_BufferHostByte > & | CPUBufferPtr () const |
| for debugging More... | |
| const UT_SharedPtr< CE_Image > & | GPUBufferPtr () const |
| void | setPixelV4 (int x, int y, const UT_Vector4F &c) |
| Sets an individual pixel. More... | |
| void | setPixelF (int x, int y, fpreal32 i) |
| void | setPixelI (int x, int y, int i) |
| UT_Vector4F | getPixelV4 (int x, int y) const |
| Fetches the value of an individual pixel. More... | |
| int | getPixelI (int x, int y) const |
| UT_Vector4F | getPixelV4 (fpreal64 x, fpreal64 y) const |
| void | getPixelRaw (UT_Array< uint8 > &dest, int x, int y) const |
| const int16 * | getCPUBufferRFixed16 () const |
| int16 * | getCPUBufferWFixed16 () |
| const uint8 * | getCPUBufferRFixed8 () const |
| uint8 * | getCPUBufferWFixed8 () |
| const fpreal16 * | getCPUBufferRF16 () const |
| fpreal16 * | getCPUBufferWF16 () |
| const fpreal32 * | getCPUBufferRF32 () const |
| fpreal32 * | getCPUBufferWF32 () |
| const unsigned char * | getCPUBufferRI8 () const |
| unsigned char * | getCPUBufferWI8 () |
| const int16 * | getCPUBufferRI16 () const |
| int16 * | getCPUBufferWI16 () |
| const int32 * | getCPUBufferRI32 () const |
| int32 * | getCPUBufferWI32 () |
| void * | getCPUBuffer (bool read, bool write) |
| void * | getCPUBufferR () const |
| void * | getCPUBufferW () |
| template<CE_Image::StorageType STORAGE> | |
| const CE_StorageTypeTraits < STORAGE >::DataType * | getCPUBufferR () const |
| template<CE_Image::StorageType STORAGE> | |
| CE_StorageTypeTraits< STORAGE > ::DataType * | getCPUBuffer (bool read, bool write) |
| template<typename OP > | |
| void | dispatch (const OP &op) const |
| CE_Image & | getGPUBuffer (bool read, bool write) |
| const CE_Image & | getGPUBufferR () const |
| CE_Image & | getGPUBufferW () |
| CE_Image & | getGPUBufferRW () |
| bool | isOnGPU () const |
| Returns true if this buffer's data is currently on the GPU. More... | |
| bool | isOnCPU () const |
| cl::Buffer | getGPUStat () const |
| bool | isDirty () const |
| False if there are computed pixels in the CPU or GPU buffer. More... | |
| void | freeBuffers () |
| Frees the pixel memory (also does setDirty()) More... | |
| void | destroy () |
| Frees all the memory used by buffer. More... | |
| bool | allocated () const |
| True if getCPU/GPUBuffer has been done since last freeBuffers() More... | |
| void | setConstantV4 (const UT_Vector4F &i) |
| void | setConstantV3 (const UT_Vector3F &i) |
| void | setConstantF (fpreal32 i=0.0f) |
| void | setConstantI (int32 i=0) |
| void | setUninitialized () |
| bool | isConstant () const |
| bool | validateBuffer () const |
| template<typename T > | |
| void | matchAndCopyToVoxels (UT_VoxelArray< T > &dest) const |
| int64 | getMemoryUsage () const |
| int64 | getDeviceMemoryUsage () const |
Public Member Functions inherited from CE_HotSwapPoolEntry | |
| CE_HotSwapPoolEntry () | |
| Creates a new buffer. You must call setSize to make this buffer usable. More... | |
| virtual | ~CE_HotSwapPoolEntry () |
| CE_HotSwapPoolEntry (const CE_HotSwapPoolEntry &)=delete | |
| CE_HotSwapPoolEntry & | operator= (const CE_HotSwapPoolEntry &)=delete |
| bool | isInUseGPU () const |
| void | setInUseGPUFlag () const |
| void | clearInUseGPUFlag () const |
Static Public Member Functions | |
| static IMX_LayerPtr | load (UT_IStream &is) |
| static IMX_LayerPtr | loadJSON (UT_JSONParser &p) |
| static int | registerLayer (IMX_LayerConstPtr layer, UT_IntArray ®istered) |
| static void | unregisterLayers (UT_IntArray ®istered) |
| static IMX_LayerConstPtr | lookupLayer (int handle) |
| Look up a registered layer by handle. More... | |
Static Public Member Functions inherited from IMX_Buffer | |
| template<CE_Image::StorageType STORAGE, typename OP > | |
| static void | dispatch (const OP &op, int channels) |
Static Public Attributes | |
| static constexpr UT_StringLit | theCameraMetadataKey = "camera_metadata" |
Additional Inherited Members | |
Public Types inherited from CE_HotSwapPoolEntry | |
| enum | EntryType { EntryType::BUFFER = 0, EntryType::VDB, EntryType::ATTRIBUTE } |
| To avoid the need for dynamic casts: More... | |
Protected Member Functions inherited from IMX_Buffer | |
| void | poolResetGPUBuffer () override |
| These implement methods required by the pool. More... | |
| void | poolSetOnGPU (bool ongpu) override |
| Update OnGPU. More... | |
| bool | poolIsGPUBufferEmpty () const override |
| True if the gpu buffer is null. More... | |
| bool | poolIsGPUBufferValid () const override |
| True if the gpu buffer is not null and valid. More... | |
| bool | poolSwapGPUBuffer (CE_HotSwapPoolEntry *otherbase) override |
| True if the swap does something. More... | |
| void | poolShallowCopyGPUBuffer (const CE_HotSwapPoolEntry *srcbase) override |
| Shallow copy. More... | |
Definition at line 30 of file IMX_Layer.h.
|
inline |
Definition at line 36 of file IMX_Layer.h.
|
inline |
"copy constructor" that does not copy the buffer pixels
Definition at line 39 of file IMX_Layer.h.
|
inline |
Initialize the IMX_Buffer.
Definition at line 42 of file IMX_Layer.h.
|
inline |
Construct a layer from a PXL_Raster.
Definition at line 49 of file IMX_Layer.h.
|
inline |
width / height of the aperture / displayWindow
Definition at line 99 of file IMX_Layer.h.
|
inline |
Definition at line 106 of file IMX_Layer.h.
|
inline |
Transform from image space to world space.
Definition at line 128 of file IMX_Layer.h.
|
inline |
Definition at line 167 of file IMX_Layer.h.
|
inline |
Definition at line 185 of file IMX_Layer.h.
|
inline |
Definition at line 156 of file IMX_Layer.h.
|
inline |
Definition at line 179 of file IMX_Layer.h.
|
inline |
Definition at line 153 of file IMX_Layer.h.
|
inline |
Definition at line 161 of file IMX_Layer.h.
|
inline |
Definition at line 190 of file IMX_Layer.h.
|
inline |
Definition at line 154 of file IMX_Layer.h.
| UT_Matrix4D IMX_Layer::bufferUVToWorldXform | ( | fpreal * | taper = nullptr | ) | const |
This is used to convert the layer to a volume, so the resulting buffer coordinates will line up with the canonical "volume" space. The z-scale is set so that the volume has isotropic voxels. If pixels are not square, voxelsize.z is max(voxelsize.x, voxelsize.y).
|
inline |
Definition at line 112 of file IMX_Layer.h.
|
inline |
Definition at line 113 of file IMX_Layer.h.
|
inline |
Definition at line 110 of file IMX_Layer.h.
| fpreal64 IMX_Layer::computeMaxLength | ( | ) | const |
Compute useful aggregate properties of the layer. For integer layers, use computeMinI() and computeMaxI().
| fpreal64 IMX_Layer::computeMinLength | ( | ) | const |
Copy everything except the buffer allocations, leaving the result dirty. This avoids any chance that writing this layer will modify the original layer. It also avoids shared pointer overhead and keeping buffers around longer than needed.
Definition at line 271 of file IMX_Layer.h.
| void IMX_Layer::copyMetadataToOptions | ( | UT_Options & | opt | ) | const |
Write our fields into the provided options: THis does not include the stat block, nor properties.
|
inline |
The dataWindow surrounds all the pixels.
Definition at line 76 of file IMX_Layer.h.
|
inline |
Definition at line 96 of file IMX_Layer.h.
|
inline |
Aperture in pixels.
Definition at line 94 of file IMX_Layer.h.
|
inline |
Definition at line 95 of file IMX_Layer.h.
|
inline |
Definition at line 107 of file IMX_Layer.h.
|
inline |
Definition at line 111 of file IMX_Layer.h.
|
inline |
Definition at line 108 of file IMX_Layer.h.
| void IMX_Layer::getCameraParms | ( | UT_CameraParms & | cam_parms, |
| UT_Matrix4D & | xform | ||
| ) | const |
|
inline |
Definition at line 115 of file IMX_Layer.h.
|
inline |
Definition at line 81 of file IMX_Layer.h.
|
inline |
Definition at line 221 of file IMX_Layer.h.
| UT_Vector3D IMX_Layer::image3ToWorld | ( | const UT_Vector3D & | v | ) | const |
|
inline |
Image <-> Buffer.
Definition at line 183 of file IMX_Layer.h.
|
inline |
Definition at line 163 of file IMX_Layer.h.
|
inline |
Definition at line 165 of file IMX_Layer.h.
|
inline |
Definition at line 217 of file IMX_Layer.h.
|
inline |
Image <-> Pixel.
Definition at line 171 of file IMX_Layer.h.
|
inline |
Coordinate transforms.
Definition at line 150 of file IMX_Layer.h.
|
inline |
Definition at line 151 of file IMX_Layer.h.
|
inline |
Definition at line 196 of file IMX_Layer.h.
|
inline |
Definition at line 208 of file IMX_Layer.h.
|
inline |
Definition at line 130 of file IMX_Layer.h.
|
inline |
Definition at line 114 of file IMX_Layer.h.
| void IMX_Layer::initFromVoxels | ( | const UT_VoxelArray< T > & | src, |
| bool | data_too | ||
| ) |
Initializes this layer from a given voxel array. Number of channels in the image will be set to tuple size of T, and the data type will also be set accordingly. Z-resolution of src must be 1. If data_too is true, the data is also copied from the source array; otherwise, this layer is only appropriate formatted and sized to match the input.
| UT_Matrix4D IMX_Layer::inverseCameraXform | ( | ) | const |
Transform from world space to camera space. Equal to invert(transform()).translate(-cameraPosition())
|
inline |
Definition at line 435 of file IMX_Layer.h.
|
inline |
Definition at line 104 of file IMX_Layer.h.
|
inline |
Definition at line 105 of file IMX_Layer.h.
|
inline |
Definition at line 160 of file IMX_Layer.h.
|
inline |
Definition at line 109 of file IMX_Layer.h.
|
static |
Returns a newly created Layer loaded from the stream, or null if load failure.
|
static |
|
inline |
Definition at line 219 of file IMX_Layer.h.
|
inline |
Definition at line 227 of file IMX_Layer.h.
|
inline |
Definition at line 235 of file IMX_Layer.h.
|
static |
Look up a registered layer by handle.
|
inline |
Distortion in image->pixel space transform.
Definition at line 88 of file IMX_Layer.h.
|
inline |
Definition at line 159 of file IMX_Layer.h.
|
inline |
Pixel <-> Buffer.
Definition at line 177 of file IMX_Layer.h.
|
inline |
Definition at line 173 of file IMX_Layer.h.
|
inline |
Definition at line 204 of file IMX_Layer.h.
|
inline |
Definition at line 360 of file IMX_Layer.h.
|
inline |
Definition at line 103 of file IMX_Layer.h.
| UT_Matrix4D IMX_Layer::projectionXform | ( | ) | const |
Transform from camera space to image space.
| UT_Matrix4D IMX_Layer::projectionXformVk | ( | ) | const |
Transform from camera space to texture space for Vulkan rasterization.
|
inline |
Definition at line 407 of file IMX_Layer.h.
|
inline |
Definition at line 83 of file IMX_Layer.h.
|
static |
Layer registration to allow layers to be converted to integers across HOM boundaries. Registers & returns the handle, adding the handle to the registered list
|
inline |
Definition at line 85 of file IMX_Layer.h.
| bool IMX_Layer::save | ( | std::ostream & | os | ) | const |
Returns true for successful save.
| bool IMX_Layer::saveJSON | ( | UT_JSONWriter & | w | ) | const |
Sets the buffer so isAligned(src) is true. Pretty much the same as copying the pixelScale but this will allow the buffer edges to not match the datawindow at all.
Definition at line 341 of file IMX_Layer.h.
Set the aspect ratio of displayWindow exactly, centering the new displayWindow into the old one, two sides will be unchanged, others may be non-integers.
Definition at line 329 of file IMX_Layer.h.
|
inline |
Definition at line 343 of file IMX_Layer.h.
|
inline |
Definition at line 342 of file IMX_Layer.h.
|
inline |
set the imageToWorld transform. This can be done at any time
Definition at line 358 of file IMX_Layer.h.
One of these functions must be called after changing the display or dataWindow. This will correctly set up the buffer size and transformations. Directly set the buffer size. The bufferToPixel transform is set so this rectangle is mapped to the dataWindow. Note this overrides the IMX_Buffer method.
|
inline |
Make the buffer pixels match the pixels. Same as setPixelScale(1), or setBufferSize(width(), height())
Definition at line 382 of file IMX_Layer.h.
| void IMX_Layer::setBufferToPixelScale | ( | const UT_Vector2D & | p | ) |
Exactly set pixelScale, however upper-right pixels of buffer may go outside of the dataWindow. Values outside the range 1..width() are not recommended.
| void IMX_Layer::setBufferToPixelTranslate | ( | const UT_Vector2D & | p | ) |
Adjust the transform so the lower-left corner of the dataWindow and buffer don't match. This value is where the center of the lower-left buffer pixel is in pixel space.
| void IMX_Layer::setBufferUVToWorldXform | ( | UT_Matrix4D | xform, |
| fpreal | taper | ||
| ) |
Sets the world transform such that the given transformation becomes this layer's UV to world.
| void IMX_Layer::setCameraParms | ( | const UT_CameraParms & | cam_parms, |
| const UT_Matrix4D & | xform | ||
| ) |
|
inline |
Definition at line 338 of file IMX_Layer.h.
Definition at line 339 of file IMX_Layer.h.
| void IMX_Layer::setCanonical | ( | ) |
Reset the transform and camera metadata to the default. Unlike setDefault(), this does not reset the data or display windows.
|
inline |
Definition at line 348 of file IMX_Layer.h.
Set both dataWindow and displayWindow to the same rectangle.
Definition at line 284 of file IMX_Layer.h.
Definition at line 285 of file IMX_Layer.h.
Set dataWindow w/o changing displayWindow.
Definition at line 292 of file IMX_Layer.h.
| void IMX_Layer::setDefault | ( | ) |
Modifications to layer metadata, in approximate order you call them.
reset metadata to default value
Set the displayWindow w/o changing dataWindow.
Definition at line 295 of file IMX_Layer.h.
Definition at line 296 of file IMX_Layer.h.
|
inline |
Definition at line 298 of file IMX_Layer.h.
|
inline |
Definition at line 308 of file IMX_Layer.h.
Definition at line 345 of file IMX_Layer.h.
Definition at line 349 of file IMX_Layer.h.
Definition at line 346 of file IMX_Layer.h.
this can be set at any time as it doesn't affect the buffer's xforms it's only used to change the display of metadata only layers as they display as cameras
Definition at line 355 of file IMX_Layer.h.
| void IMX_Layer::setImageToWorldXform | ( | const UT_Matrix4D & | m | ) |
| void IMX_Layer::setInverseCameraXform | ( | const UT_Matrix4D & | m | ) |
set the inverseCameraTransform which will set the transform. Using this avoids multiple inverts of the matrix to get the value back.
|
inline |
a layer that is metadata only does not have a buffer and is represented in the viewport by a camera along with an imaging plane layers marked metadata only can only be plugged into metadata inputs
Definition at line 434 of file IMX_Layer.h.
Definition at line 347 of file IMX_Layer.h.
|
inline |
Definition at line 336 of file IMX_Layer.h.
|
inline |
Definition at line 337 of file IMX_Layer.h.
Set pixel aspect ratio. This must be done before setDataWindow.
Definition at line 281 of file IMX_Layer.h.
| void IMX_Layer::setPixelScale | ( | const UT_Vector2D & | ) |
|
inline |
Definition at line 333 of file IMX_Layer.h.
|
inline |
Definition at line 405 of file IMX_Layer.h.
|
inline |
Definition at line 350 of file IMX_Layer.h.
|
inline |
Definition at line 116 of file IMX_Layer.h.
|
inline |
Definition at line 84 of file IMX_Layer.h.
|
inline |
Definition at line 192 of file IMX_Layer.h.
|
inline |
Definition at line 157 of file IMX_Layer.h.
|
inline |
Definition at line 198 of file IMX_Layer.h.
|
inline |
Definition at line 202 of file IMX_Layer.h.
|
inline |
Definition at line 129 of file IMX_Layer.h.
|
inline |
Definition at line 359 of file IMX_Layer.h.
Our "pixel" space 0,0 doesn't necessarily correspond to the corner of our Image space. This adjusts that offset by panning both the data and the dispaly window. Data window is always integral so this only allows pixel level adjustment.
Definition at line 317 of file IMX_Layer.h.
|
static |
Unregister all layers corresponding to the provided list, erase the list afterwards. Assertion if handle wasn't regsitered
| void IMX_Layer::updateMetadataFromOptions | ( | const UT_Options & | opt | ) |
Load ourselves from the options, ignoring fields we don't know.
|
inline |
Updates the contents of the properties, first making sure it is unique. The provided operator should take a reference to a UT_Options that it will update. this->update([](UT_Options &opt) { opt.setOptionS("test", "bar"); });
Definition at line 415 of file IMX_Layer.h.
| UT_Vector3D IMX_Layer::voxelSize | ( | ) | const |
World space voxel size, where xy is the pixel size and z is max(x,y).
|
inline |
Definition at line 82 of file IMX_Layer.h.
|
inline |
Definition at line 80 of file IMX_Layer.h.
|
inline |
Definition at line 210 of file IMX_Layer.h.
| UT_Vector3D IMX_Layer::worldToImage3 | ( | const UT_Vector3D & | v | ) | const |
|
inline |
Definition at line 237 of file IMX_Layer.h.
|
inline |
Definition at line 77 of file IMX_Layer.h.
|
inline |
Definition at line 79 of file IMX_Layer.h.
|
inline |
Definition at line 78 of file IMX_Layer.h.
|
static |
Definition at line 34 of file IMX_Layer.h.