openNURBS SDK Help
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ON_3dmRenderSettings Class Reference

#include <opennurbs_3dm_settings.h>

Inheritance diagram for ON_3dmRenderSettings:
ON_Object

Public Types

enum  RenderingSources : unsigned int { RenderingSources::ActiveViewport, RenderingSources::SpecificViewport, RenderingSources::NamedView, RenderingSources::SnapShot }
 
- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 

Public Member Functions

 ON_3dmRenderSettings ()=default
 
 ON_3dmRenderSettings (const ON_3dmRenderSettings &)=default
 
 ~ON_3dmRenderSettings ()=default
 
void Dump (ON_TextLog &text_log) const override
 
ON_wString NamedView (void) const
 
ON_3dmRenderSettingsoperator= (const ON_3dmRenderSettings &)=default
 
bool Read (ON_BinaryArchive &) override
 
RenderingSources RenderingSource (void) const
 
bool ScaleBackgroundToFit () const
 
void SetNamedView (const ON_wString &)
 
void SetRenderingSource (RenderingSources)
 
void SetScaleBackgroundToFit (bool bScaleBackgroundToFit)
 
void SetSnapshot (const ON_wString &)
 
void SetSpecificViewport (const ON_wString &)
 
ON_wString Snapshot (void) const
 
ON_wString SpecificViewport (void) const
 
bool Write (ON_BinaryArchive &) const override
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
void CopyUserData (const ON_Object &source_object)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
bool DetachUserData (class ON_UserData *pUserData)
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual bool IsValid (class ON_TextLog *text_log=nullptr) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
void MoveUserData (ON_Object &source_object)
 
virtual ON::object_type ObjectType () const
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
virtual unsigned int SizeOf () const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 

Public Attributes

ON_Color m_ambient_light = ON_Color::Black
 
int m_antialias_style = 1
 0 = none, 1 = normal, 2 = medium, 3 = best More...
 
ON_wString m_background_bitmap_filename
 
ON_Color m_background_bottom_color = ON_Color::Gray160
 
ON_Color m_background_color = ON_Color::White
 
int m_background_style = 0
 0 = solid color, 1 = "wallpaper" image, 2 = Gradient, 3 = Environment More...
 
bool m_bCustomImageSize = false
 
bool m_bDepthCue = false
 
bool m_bFlatShade = false
 
bool m_bForceViewportAspectRatio = false
 
bool m_bRenderAnnotation = false
 
bool m_bRenderBackfaces = true
 
bool m_bRenderCurves = false
 
bool m_bRenderIsoparams = false
 
bool m_bRenderMeshEdges = false
 
bool m_bRenderPoints = false
 
bool m_bScaleBackgroundToFit = false
 
bool m_bTransparentBackground = false
 
bool m_bUseHiddenLights = false
 
bool m_bUsesAmbientAttr = true
 
bool m_bUsesAnnotationAttr = true
 
bool m_bUsesBackfaceAttr = false
 
bool m_bUsesBackgroundAttr = true
 
bool m_bUsesCurvesAttr = true
 
bool m_bUsesHiddenLightsAttr = true
 
bool m_bUsesIsoparmsAttr = true
 
bool m_bUsesMeshEdgesAttr = false
 
bool m_bUsesPointsAttr = false
 
ON_UUID m_embedded_image_file_id = ON_nil_uuid
 
double m_image_dpi = 72.0
 
int m_image_height = 600
 image height in pixels More...
 
ON::LengthUnitSystem m_image_us = ON::LengthUnitSystem::Inches
 
int m_image_width = 800
 image width in pixels More...
 
int m_shadowmap_height = 1000
 
double m_shadowmap_offset = 0.75
 
int m_shadowmap_style = 1
 0 = none, 1 = normal, 2 = best More...
 
int m_shadowmap_width = 1000
 

Static Public Attributes

static const ON_3dmRenderSettings Default
 

Detailed Description

ON_3dmRenderSettings

Member Enumeration Documentation

◆ RenderingSources

enum ON_3dmRenderSettings::RenderingSources : unsigned int
strong

New for V6, rendering source (render directly from a NamedView or Snapshot) https://mcneel.myjetbrains.com/youtrack/issue/RH-39593

Enumerator
ActiveViewport 

Get the rendering view from the currently active viewport (as in all previous versions of Rhino)

SpecificViewport 

Get the rendering view from the named viewport (see NamedViewport below)

NamedView 

Get the rendering view from a specific named view (see NamedView below)

SnapShot 

Before rendering, restore the Snapshot specified in Snapshot below, then render.

Constructor & Destructor Documentation

◆ ON_3dmRenderSettings() [1/2]

ON_3dmRenderSettings::ON_3dmRenderSettings ( )
default

◆ ~ON_3dmRenderSettings()

ON_3dmRenderSettings::~ON_3dmRenderSettings ( )
default

◆ ON_3dmRenderSettings() [2/2]

ON_3dmRenderSettings::ON_3dmRenderSettings ( const ON_3dmRenderSettings )
default

Member Function Documentation

◆ Dump()

void ON_3dmRenderSettings::Dump ( ON_TextLog ) const
overridevirtual

Description: Creates a text dump of the object. Remarks: Dump() is intended for debugging and is not suitable for creating high quality text descriptions of an object.

The default implementations of this virtual function prints the class's name.

Reimplemented from ON_Object.

◆ NamedView()

ON_wString ON_3dmRenderSettings::NamedView ( void  ) const

◆ operator=()

ON_3dmRenderSettings& ON_3dmRenderSettings::operator= ( const ON_3dmRenderSettings )
default

◆ Read()

bool ON_3dmRenderSettings::Read ( ON_BinaryArchive binary_archive)
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

◆ RenderingSource()

RenderingSources ON_3dmRenderSettings::RenderingSource ( void  ) const

◆ ScaleBackgroundToFit()

bool ON_3dmRenderSettings::ScaleBackgroundToFit ( ) const

◆ SetNamedView()

void ON_3dmRenderSettings::SetNamedView ( const ON_wString )

◆ SetRenderingSource()

void ON_3dmRenderSettings::SetRenderingSource ( RenderingSources  )

◆ SetScaleBackgroundToFit()

void ON_3dmRenderSettings::SetScaleBackgroundToFit ( bool  bScaleBackgroundToFit)

◆ SetSnapshot()

void ON_3dmRenderSettings::SetSnapshot ( const ON_wString )

◆ SetSpecificViewport()

void ON_3dmRenderSettings::SetSpecificViewport ( const ON_wString )

◆ Snapshot()

ON_wString ON_3dmRenderSettings::Snapshot ( void  ) const

◆ SpecificViewport()

ON_wString ON_3dmRenderSettings::SpecificViewport ( void  ) const

◆ Write()

bool ON_3dmRenderSettings::Write ( ON_BinaryArchive binary_archive) const
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.
The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

Member Data Documentation

◆ Default

const ON_3dmRenderSettings ON_3dmRenderSettings::Default
static

◆ m_ambient_light

ON_Color ON_3dmRenderSettings::m_ambient_light = ON_Color::Black

◆ m_antialias_style

int ON_3dmRenderSettings::m_antialias_style = 1

0 = none, 1 = normal, 2 = medium, 3 = best

◆ m_background_bitmap_filename

ON_wString ON_3dmRenderSettings::m_background_bitmap_filename

◆ m_background_bottom_color

ON_Color ON_3dmRenderSettings::m_background_bottom_color = ON_Color::Gray160

◆ m_background_color

ON_Color ON_3dmRenderSettings::m_background_color = ON_Color::White

m_background_color was changed from ON_Color::Gray160 to ON_Color::White for "white studio" look. m_background_color = Top color of gradient...

◆ m_background_style

int ON_3dmRenderSettings::m_background_style = 0

0 = solid color, 1 = "wallpaper" image, 2 = Gradient, 3 = Environment

◆ m_bCustomImageSize

bool ON_3dmRenderSettings::m_bCustomImageSize = false

Custom image size: If m_bCustomImageSize is true, then the image pixel size is m_image_width X m_image_height pixels. If m_bCustomImageSize is false, then the image pixel size is the size of the viewport being rendered.

◆ m_bDepthCue

bool ON_3dmRenderSettings::m_bDepthCue = false

◆ m_bFlatShade

bool ON_3dmRenderSettings::m_bFlatShade = false

◆ m_bForceViewportAspectRatio

bool ON_3dmRenderSettings::m_bForceViewportAspectRatio = false

Force viewport aspect ratio: If m_bCustomImageSize is true and m_bForceViewportAspectRatio is true then the image height should be calculated by multiplying the m_image_width by the viewport aspect ratio. Note that this might be affected by m_rendering_source In this case, m_image_height should not be used.

◆ m_bRenderAnnotation

bool ON_3dmRenderSettings::m_bRenderAnnotation = false

◆ m_bRenderBackfaces

bool ON_3dmRenderSettings::m_bRenderBackfaces = true

◆ m_bRenderCurves

bool ON_3dmRenderSettings::m_bRenderCurves = false

◆ m_bRenderIsoparams

bool ON_3dmRenderSettings::m_bRenderIsoparams = false

◆ m_bRenderMeshEdges

bool ON_3dmRenderSettings::m_bRenderMeshEdges = false

◆ m_bRenderPoints

bool ON_3dmRenderSettings::m_bRenderPoints = false

◆ m_bScaleBackgroundToFit

bool ON_3dmRenderSettings::m_bScaleBackgroundToFit = false

◆ m_bTransparentBackground

bool ON_3dmRenderSettings::m_bTransparentBackground = false

◆ m_bUseHiddenLights

bool ON_3dmRenderSettings::m_bUseHiddenLights = false

◆ m_bUsesAmbientAttr

bool ON_3dmRenderSettings::m_bUsesAmbientAttr = true

Flags that are used to determine which render settings a render plugin uses, and which ones the display pipeline should use. Note: Render plugins set these, and they don't need to persist in the document...Also, when set, they turn OFF their corresponding setting in the Display Attributes Manager's UI pages for "Rendered" mode.

◆ m_bUsesAnnotationAttr

bool ON_3dmRenderSettings::m_bUsesAnnotationAttr = true

◆ m_bUsesBackfaceAttr

bool ON_3dmRenderSettings::m_bUsesBackfaceAttr = false

◆ m_bUsesBackgroundAttr

bool ON_3dmRenderSettings::m_bUsesBackgroundAttr = true

◆ m_bUsesCurvesAttr

bool ON_3dmRenderSettings::m_bUsesCurvesAttr = true

◆ m_bUsesHiddenLightsAttr

bool ON_3dmRenderSettings::m_bUsesHiddenLightsAttr = true

◆ m_bUsesIsoparmsAttr

bool ON_3dmRenderSettings::m_bUsesIsoparmsAttr = true

◆ m_bUsesMeshEdgesAttr

bool ON_3dmRenderSettings::m_bUsesMeshEdgesAttr = false

◆ m_bUsesPointsAttr

bool ON_3dmRenderSettings::m_bUsesPointsAttr = false

◆ m_embedded_image_file_id

ON_UUID ON_3dmRenderSettings::m_embedded_image_file_id = ON_nil_uuid

If m_background_bitmap_filename is not empty, the file cannot be found, and m_embedded_file_id identifes an embedded image file in the model, then that file will be used as the background bitmap.

◆ m_image_dpi

double ON_3dmRenderSettings::m_image_dpi = 72.0

Number of dots/inch (dots=pixels) to use when printing and saving bitmaps. The default is 72.0 dots/inch.

◆ m_image_height

int ON_3dmRenderSettings::m_image_height = 600

image height in pixels

◆ m_image_us

ON::LengthUnitSystem ON_3dmRenderSettings::m_image_us = ON::LengthUnitSystem::Inches

unit system to use when converting image pixel size and dpi information into a print size. Default = inches

◆ m_image_width

int ON_3dmRenderSettings::m_image_width = 800

image width in pixels

◆ m_shadowmap_height

int ON_3dmRenderSettings::m_shadowmap_height = 1000

◆ m_shadowmap_offset

double ON_3dmRenderSettings::m_shadowmap_offset = 0.75

◆ m_shadowmap_style

int ON_3dmRenderSettings::m_shadowmap_style = 1

0 = none, 1 = normal, 2 = best

◆ m_shadowmap_width

int ON_3dmRenderSettings::m_shadowmap_width = 1000