1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-05 11:24:17 +03:00

Coding - Update method guards for consistency #333

Apply new regex replacement with method's guards in .cxx
Update GH workflow with style checking
This commit is contained in:
Pasukhin Dmitry 2025-02-03 12:16:00 +01:00 committed by GitHub
parent 3ce9ec7651
commit 1f386af59f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
283 changed files with 4815 additions and 9694 deletions

View File

@ -61,9 +61,7 @@ runs:
run: | run: |
git diff > format.patch git diff > format.patch
if ((Get-Item format.patch).length -gt 0) { if ((Get-Item format.patch).length -gt 0) {
echo "::error::Files need formatting. To fix: 1. Download format.patch 2. \"git apply format.patch\" 3. Commit and push"
echo "has_changes=true" >> $env:GITHUB_OUTPUT echo "has_changes=true" >> $env:GITHUB_OUTPUT
exit 1
} }
- name: Upload patch - name: Upload patch
@ -73,6 +71,13 @@ runs:
name: format-patch name: format-patch
path: format.patch path: format.patch
- name: Failing step for formatting issues
if: steps.git-check.outputs.has_changes == 'true'
shell: pwsh
run: |
echo "::error::Files need formatting. To fix: 1. Download format.patch 2. \"git apply format.patch\" 3. Commit and push"
exit 1
branding: branding:
icon: 'check-square' icon: 'check-square'
color: 'green' color: 'green'

View File

@ -18,10 +18,8 @@
IMPLEMENT_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(AIS_GlobalStatus, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : AIS_GlobalStatus
// purpose :
// =======================================================================
AIS_GlobalStatus::AIS_GlobalStatus() AIS_GlobalStatus::AIS_GlobalStatus()
: myDispMode(0), : myDispMode(0),
myIsHilit(Standard_False), myIsHilit(Standard_False),

View File

@ -3282,10 +3282,8 @@ void AIS_InteractiveContext::AddOrRemoveSelected(const Handle(SelectMgr_EntityOw
} }
} }
// ======================================================================= //=================================================================================================
// function : SetSelectedState
// purpose :
// =======================================================================
Standard_Boolean AIS_InteractiveContext::SetSelectedState( Standard_Boolean AIS_InteractiveContext::SetSelectedState(
const Handle(SelectMgr_EntityOwner)& theEntity, const Handle(SelectMgr_EntityOwner)& theEntity,
const Standard_Boolean theIsSelected) const Standard_Boolean theIsSelected)
@ -3676,10 +3674,8 @@ void AIS_InteractiveContext::SetSelectionModeActive(
(*aStat)->AddSelectionMode(theMode); (*aStat)->AddSelectionMode(theMode);
} }
// ============================================================================ //=================================================================================================
// function : Activate
// purpose :
// ============================================================================
void AIS_InteractiveContext::Activate(const Standard_Integer theMode, void AIS_InteractiveContext::Activate(const Standard_Integer theMode,
const Standard_Boolean theIsForce) const Standard_Boolean theIsForce)
{ {
@ -3692,10 +3688,8 @@ void AIS_InteractiveContext::Activate(const Standard_Integer theMode,
} }
} }
// ============================================================================ //=================================================================================================
// function : Deactivate
// purpose :
// ============================================================================
void AIS_InteractiveContext::Deactivate(const Standard_Integer theMode) void AIS_InteractiveContext::Deactivate(const Standard_Integer theMode)
{ {
AIS_ListOfInteractive aDisplayedObjects; AIS_ListOfInteractive aDisplayedObjects;
@ -3706,10 +3700,8 @@ void AIS_InteractiveContext::Deactivate(const Standard_Integer theMode)
} }
} }
// ============================================================================ //=================================================================================================
// function : Deactivate
// purpose :
// ============================================================================
void AIS_InteractiveContext::Deactivate() void AIS_InteractiveContext::Deactivate()
{ {
AIS_ListOfInteractive aDisplayedObjects; AIS_ListOfInteractive aDisplayedObjects;

View File

@ -34,10 +34,8 @@
IMPLEMENT_STANDARD_RTTIEXT(AIS_LightSource, AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(AIS_LightSource, AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(AIS_LightSourceOwner, SelectMgr_EntityOwner) IMPLEMENT_STANDARD_RTTIEXT(AIS_LightSourceOwner, SelectMgr_EntityOwner)
// ======================================================================= //=================================================================================================
// function : AIS_LightSourceOwner
// purpose :
// =======================================================================
AIS_LightSourceOwner::AIS_LightSourceOwner(const Handle(AIS_LightSource)& theObject, AIS_LightSourceOwner::AIS_LightSourceOwner(const Handle(AIS_LightSource)& theObject,
Standard_Integer thePriority) Standard_Integer thePriority)
: SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)theObject, thePriority) : SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)theObject, thePriority)
@ -45,10 +43,8 @@ AIS_LightSourceOwner::AIS_LightSourceOwner(const Handle(AIS_LightSource)& theObj
// //
} }
// ======================================================================= //=================================================================================================
// function : HandleMouseClick
// purpose :
// =======================================================================
Standard_Boolean AIS_LightSourceOwner::HandleMouseClick(const Graphic3d_Vec2i&, Standard_Boolean AIS_LightSourceOwner::HandleMouseClick(const Graphic3d_Vec2i&,
Aspect_VKeyMouse theKey, Aspect_VKeyMouse theKey,
Aspect_VKeyFlags theFlags, Aspect_VKeyFlags theFlags,
@ -167,10 +163,8 @@ Standard_Boolean AIS_LightSourceOwner::IsForcedHilight() const
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : Constructor
// purpose :
// =======================================================================
AIS_LightSource::AIS_LightSource(const Handle(Graphic3d_CLight)& theLight) AIS_LightSource::AIS_LightSource(const Handle(Graphic3d_CLight)& theLight)
: myLightSource(theLight), : myLightSource(theLight),
myCodirMarkerType(Aspect_TOM_X), myCodirMarkerType(Aspect_TOM_X),
@ -295,10 +289,8 @@ Standard_Boolean AIS_LightSource::ProcessDragging(const Handle(AIS_InteractiveCo
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : updateLightAspects
// purpose :
// =======================================================================
void AIS_LightSource::updateLightAspects() void AIS_LightSource::updateLightAspects()
{ {
const Quantity_Color aBaseColor = myLightSource->Color(); const Quantity_Color aBaseColor = myLightSource->Color();
@ -333,10 +325,8 @@ void AIS_LightSource::updateLightAspects()
SynchronizeAspects(); SynchronizeAspects();
} }
// ======================================================================= //=================================================================================================
// function : updateLightTransformPersistence
// purpose :
// =======================================================================
void AIS_LightSource::updateLightTransformPersistence() void AIS_LightSource::updateLightTransformPersistence()
{ {
Handle(Graphic3d_TransformPers) aTrsfPers = myTransformPersistence; Handle(Graphic3d_TransformPers) aTrsfPers = myTransformPersistence;
@ -421,10 +411,8 @@ void AIS_LightSource::updateLightTransformPersistence()
SetTransformPersistence(aTrsfPers); SetTransformPersistence(aTrsfPers);
} }
// ======================================================================= //=================================================================================================
// function : updateLightLocalTransformation
// purpose :
// =======================================================================
void AIS_LightSource::updateLightLocalTransformation() void AIS_LightSource::updateLightLocalTransformation()
{ {
myLocalTransformation.Nullify(); myLocalTransformation.Nullify();
@ -470,10 +458,8 @@ void AIS_LightSource::updateLightLocalTransformation()
UpdateTransformation(); UpdateTransformation();
} }
// ======================================================================= //=================================================================================================
// function : setLocalTransformation
// purpose :
// =======================================================================
void AIS_LightSource::setLocalTransformation(const Handle(TopLoc_Datum3D)& theTrsf) void AIS_LightSource::setLocalTransformation(const Handle(TopLoc_Datum3D)& theTrsf)
{ {
const gp_Trsf aTrsf = !theTrsf.IsNull() ? theTrsf->Transformation() : gp_Trsf(); const gp_Trsf aTrsf = !theTrsf.IsNull() ? theTrsf->Transformation() : gp_Trsf();
@ -513,10 +499,8 @@ void AIS_LightSource::setLocalTransformation(const Handle(TopLoc_Datum3D)& theTr
updateLightTransformPersistence(); updateLightTransformPersistence();
} }
// ======================================================================= //=================================================================================================
// function : Compute
// purpose :
// =======================================================================
void AIS_LightSource::Compute(const Handle(PrsMgr_PresentationManager)&, void AIS_LightSource::Compute(const Handle(PrsMgr_PresentationManager)&,
const Handle(Prs3d_Presentation)& thePrs, const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) const Standard_Integer theMode)
@ -559,10 +543,8 @@ void AIS_LightSource::Compute(const Handle(PrsMgr_PresentationManager)&,
} }
} }
// ======================================================================= //=================================================================================================
// function : computeAmbient
// purpose :
// =======================================================================
void AIS_LightSource::computeAmbient(const Handle(Prs3d_Presentation)& thePrs, void AIS_LightSource::computeAmbient(const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) const Standard_Integer theMode)
{ {
@ -635,10 +617,8 @@ void AIS_LightSource::computeAmbient(const Handle(Prs3d_Presentation)& thePrs,
} }
} }
// ======================================================================= //=================================================================================================
// function : computeDirectional
// purpose :
// =======================================================================
void AIS_LightSource::computeDirectional(const Handle(Prs3d_Presentation)& thePrs, void AIS_LightSource::computeDirectional(const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) const Standard_Integer theMode)
{ {
@ -763,10 +743,8 @@ void AIS_LightSource::computeDirectional(const Handle(Prs3d_Presentation)& thePr
} }
} }
// ======================================================================= //=================================================================================================
// function : computePositional
// purpose :
// =======================================================================
void AIS_LightSource::computePositional(const Handle(Prs3d_Presentation)& thePrs, void AIS_LightSource::computePositional(const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) const Standard_Integer theMode)
{ {
@ -792,10 +770,8 @@ void AIS_LightSource::computePositional(const Handle(Prs3d_Presentation)& thePrs
} }
} }
// ======================================================================= //=================================================================================================
// function : computeSpot
// purpose :
// =======================================================================
void AIS_LightSource::computeSpot(const Handle(Prs3d_Presentation)& thePrs, void AIS_LightSource::computeSpot(const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) const Standard_Integer theMode)
{ {
@ -851,10 +827,8 @@ void AIS_LightSource::computeSpot(const Handle(Prs3d_Presentation)& thePrs,
} }
} }
// ======================================================================= //=================================================================================================
// function : ComputeSelection
// purpose :
// =======================================================================
void AIS_LightSource::ComputeSelection(const Handle(SelectMgr_Selection)& theSel, void AIS_LightSource::ComputeSelection(const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) const Standard_Integer theMode)
{ {

View File

@ -71,10 +71,8 @@ AIS_MediaPlayer::~AIS_MediaPlayer()
myFramePair.Nullify(); myFramePair.Nullify();
} }
// ======================================================================= //=================================================================================================
// function : OpenInput
// purpose :
// =======================================================================
void AIS_MediaPlayer::OpenInput(const TCollection_AsciiString& thePath, Standard_Boolean theToWait) void AIS_MediaPlayer::OpenInput(const TCollection_AsciiString& thePath, Standard_Boolean theToWait)
{ {
if (myFramePair->PlayerContext().IsNull() && thePath.IsEmpty()) if (myFramePair->PlayerContext().IsNull() && thePath.IsEmpty())
@ -86,10 +84,8 @@ void AIS_MediaPlayer::OpenInput(const TCollection_AsciiString& thePath, Standard
SynchronizeAspects(); SynchronizeAspects();
} }
// ======================================================================= //=================================================================================================
// function : PresentFrame
// purpose :
// =======================================================================
bool AIS_MediaPlayer::PresentFrame(const Graphic3d_Vec2i& theLeftCorner, bool AIS_MediaPlayer::PresentFrame(const Graphic3d_Vec2i& theLeftCorner,
const Graphic3d_Vec2i& theMaxSize) const Graphic3d_Vec2i& theMaxSize)
{ {
@ -128,10 +124,8 @@ bool AIS_MediaPlayer::PresentFrame(const Graphic3d_Vec2i& theLeftCorner,
return toRedraw; return toRedraw;
} }
// ======================================================================= //=================================================================================================
// function : updateSize
// purpose :
// =======================================================================
bool AIS_MediaPlayer::updateSize(const Graphic3d_Vec2i& theLeftCorner, bool AIS_MediaPlayer::updateSize(const Graphic3d_Vec2i& theLeftCorner,
const Graphic3d_Vec2i& theMaxSize) const Graphic3d_Vec2i& theMaxSize)
{ {
@ -185,10 +179,8 @@ bool AIS_MediaPlayer::updateSize(const Graphic3d_Vec2i& theLeftCorner,
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : PlayPause
// purpose :
// =======================================================================
void AIS_MediaPlayer::PlayPause() void AIS_MediaPlayer::PlayPause()
{ {
if (myFramePair->PlayerContext().IsNull()) if (myFramePair->PlayerContext().IsNull())
@ -201,10 +193,8 @@ void AIS_MediaPlayer::PlayPause()
myFramePair->PlayerContext()->PlayPause(isPaused, aProgress, aDuration); myFramePair->PlayerContext()->PlayPause(isPaused, aProgress, aDuration);
} }
// ======================================================================= //=================================================================================================
// function : Compute
// purpose :
// =======================================================================
void AIS_MediaPlayer::Compute(const Handle(PrsMgr_PresentationManager)&, void AIS_MediaPlayer::Compute(const Handle(PrsMgr_PresentationManager)&,
const Handle(Prs3d_Presentation)& thePrs, const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) const Standard_Integer theMode)
@ -227,10 +217,8 @@ void AIS_MediaPlayer::Compute(const Handle(PrsMgr_PresentationManager)&,
} }
} }
// ======================================================================= //=================================================================================================
// function : ComputeSelection
// purpose :
// =======================================================================
void AIS_MediaPlayer::ComputeSelection(const Handle(SelectMgr_Selection)& theSel, void AIS_MediaPlayer::ComputeSelection(const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) const Standard_Integer theMode)
{ {

View File

@ -738,10 +738,8 @@ Handle(Select3D_SensitiveEntity) AIS_Trihedron::createSensitiveEntity(
return Handle(Select3D_SensitiveEntity)(); return Handle(Select3D_SensitiveEntity)();
} }
// ======================================================================= //=================================================================================================
// function : updatePrimitives
// purpose :
// =======================================================================
void AIS_Trihedron::updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect, void AIS_Trihedron::updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect,
Prs3d_DatumMode theMode, Prs3d_DatumMode theMode,
const gp_Pnt& theOrigin, const gp_Pnt& theOrigin,

View File

@ -16,10 +16,8 @@
IMPLEMENT_STANDARD_RTTIEXT(AIS_TrihedronOwner, SelectMgr_EntityOwner) IMPLEMENT_STANDARD_RTTIEXT(AIS_TrihedronOwner, SelectMgr_EntityOwner)
// ======================================================================= //=================================================================================================
// function : AIS_TrihedronOwner
// purpose :
// =======================================================================
AIS_TrihedronOwner::AIS_TrihedronOwner(const Handle(SelectMgr_SelectableObject)& theSelObject, AIS_TrihedronOwner::AIS_TrihedronOwner(const Handle(SelectMgr_SelectableObject)& theSelObject,
const Prs3d_DatumParts thePart, const Prs3d_DatumParts thePart,
const Standard_Integer thePriority) const Standard_Integer thePriority)
@ -28,10 +26,8 @@ AIS_TrihedronOwner::AIS_TrihedronOwner(const Handle(SelectMgr_SelectableObject)&
{ {
} }
// ======================================================================= //=================================================================================================
// function : HilightWithColor
// purpose :
// =======================================================================
void AIS_TrihedronOwner::HilightWithColor(const Handle(PrsMgr_PresentationManager)& thePM, void AIS_TrihedronOwner::HilightWithColor(const Handle(PrsMgr_PresentationManager)& thePM,
const Handle(Prs3d_Drawer)& theStyle, const Handle(Prs3d_Drawer)& theStyle,
const Standard_Integer /*theMode*/) const Standard_Integer /*theMode*/)
@ -39,10 +35,8 @@ void AIS_TrihedronOwner::HilightWithColor(const Handle(PrsMgr_PresentationManage
Selectable()->HilightOwnerWithColor(thePM, theStyle, this); Selectable()->HilightOwnerWithColor(thePM, theStyle, this);
} }
// ======================================================================= //=================================================================================================
// function : IsHilighted
// purpose :
// =======================================================================
Standard_Boolean AIS_TrihedronOwner::IsHilighted(const Handle(PrsMgr_PresentationManager)& thePM, Standard_Boolean AIS_TrihedronOwner::IsHilighted(const Handle(PrsMgr_PresentationManager)& thePM,
const Standard_Integer theMode) const const Standard_Integer theMode) const
{ {
@ -54,10 +48,8 @@ Standard_Boolean AIS_TrihedronOwner::IsHilighted(const Handle(PrsMgr_Presentatio
return thePM->IsHighlighted(Selectable(), theMode); return thePM->IsHighlighted(Selectable(), theMode);
} }
// ======================================================================= //=================================================================================================
// function : Unhilight
// purpose :
// =======================================================================
void AIS_TrihedronOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& thePM, void AIS_TrihedronOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& thePM,
const Standard_Integer theMode) const Standard_Integer theMode)
{ {

View File

@ -27,10 +27,8 @@
#include <V3d_Viewer.hxx> #include <V3d_Viewer.hxx>
#include <WNT_HIDSpaceMouse.hxx> #include <WNT_HIDSpaceMouse.hxx>
// ======================================================================= //=================================================================================================
// function : AIS_ViewController
// purpose :
// =======================================================================
AIS_ViewController::AIS_ViewController() AIS_ViewController::AIS_ViewController()
: myLastEventsTime(0.0), : myLastEventsTime(0.0),
myToAskNextFrame(false), myToAskNextFrame(false),
@ -174,19 +172,15 @@ AIS_ViewController::AIS_ViewController()
myXRSelectHaptic.Amplitude = 0.5f; myXRSelectHaptic.Amplitude = 0.5f;
} }
// ======================================================================= //=================================================================================================
// function : ~AIS_ViewController
// purpose :
// =======================================================================
AIS_ViewController::~AIS_ViewController() AIS_ViewController::~AIS_ViewController()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : ResetViewInput
// purpose :
// =======================================================================
void AIS_ViewController::ResetViewInput() void AIS_ViewController::ResetViewInput()
{ {
myKeys.Reset(); myKeys.Reset();
@ -199,10 +193,8 @@ void AIS_ViewController::ResetViewInput()
myMouseClickCounter = 0; myMouseClickCounter = 0;
} }
// ======================================================================= //=================================================================================================
// function : FlushViewEvents
// purpose :
// =======================================================================
void AIS_ViewController::FlushViewEvents(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::FlushViewEvents(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
Standard_Boolean theToHandle) Standard_Boolean theToHandle)
@ -262,10 +254,8 @@ void AIS_ViewController::FlushViewEvents(const Handle(AIS_InteractiveContext)& t
} }
} }
// ======================================================================= //=================================================================================================
// function : flushBuffers
// purpose :
// =======================================================================
void AIS_ViewController::flushBuffers(const Handle(AIS_InteractiveContext)&, void AIS_ViewController::flushBuffers(const Handle(AIS_InteractiveContext)&,
const Handle(V3d_View)&) const Handle(V3d_View)&)
{ {
@ -393,10 +383,8 @@ void AIS_ViewController::flushBuffers(const Handle(AIS_InteractiveContext)&,
} }
} }
// ======================================================================= //=================================================================================================
// function : flushGestures
// purpose :
// =======================================================================
void AIS_ViewController::flushGestures(const Handle(AIS_InteractiveContext)&, void AIS_ViewController::flushGestures(const Handle(AIS_InteractiveContext)&,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -543,10 +531,8 @@ void AIS_ViewController::flushGestures(const Handle(AIS_InteractiveContext)&,
} }
} }
// ======================================================================= //=================================================================================================
// function : UpdateViewOrientation
// purpose :
// =======================================================================
void AIS_ViewController::UpdateViewOrientation(V3d_TypeOfOrientation theOrientation, void AIS_ViewController::UpdateViewOrientation(V3d_TypeOfOrientation theOrientation,
bool theToFitAll) bool theToFitAll)
{ {
@ -555,10 +541,8 @@ void AIS_ViewController::UpdateViewOrientation(V3d_TypeOfOrientation theOrientat
myUI.Orientation.ViewOrient = theOrientation; myUI.Orientation.ViewOrient = theOrientation;
} }
// ======================================================================= //=================================================================================================
// function : SelectInViewer
// purpose :
// =======================================================================
void AIS_ViewController::SelectInViewer(const Graphic3d_Vec2i& thePnt, void AIS_ViewController::SelectInViewer(const Graphic3d_Vec2i& thePnt,
const AIS_SelectionScheme theScheme) const AIS_SelectionScheme theScheme)
{ {
@ -572,10 +556,8 @@ void AIS_ViewController::SelectInViewer(const Graphic3d_Vec2i& thePnt,
myUI.Selection.Points.Append(thePnt); myUI.Selection.Points.Append(thePnt);
} }
// ======================================================================= //=================================================================================================
// function : SelectInViewer
// purpose :
// =======================================================================
void AIS_ViewController::SelectInViewer(const NCollection_Sequence<Graphic3d_Vec2i>& thePnts, void AIS_ViewController::SelectInViewer(const NCollection_Sequence<Graphic3d_Vec2i>& thePnts,
const AIS_SelectionScheme theScheme) const AIS_SelectionScheme theScheme)
{ {
@ -596,10 +578,8 @@ void AIS_ViewController::SelectInViewer(const NCollection_Sequence<Graphic3d_Vec
} }
} }
// ======================================================================= //=================================================================================================
// function : UpdateRubberBand
// purpose :
// =======================================================================
void AIS_ViewController::UpdateRubberBand(const Graphic3d_Vec2i& thePntFrom, void AIS_ViewController::UpdateRubberBand(const Graphic3d_Vec2i& thePntFrom,
const Graphic3d_Vec2i& thePntTo) const Graphic3d_Vec2i& thePntTo)
{ {
@ -609,10 +589,8 @@ void AIS_ViewController::UpdateRubberBand(const Graphic3d_Vec2i& thePntFrom,
myUI.Selection.Points.Append(thePntTo); myUI.Selection.Points.Append(thePntTo);
} }
// ======================================================================= //=================================================================================================
// function : UpdatePolySelection
// purpose :
// =======================================================================
void AIS_ViewController::UpdatePolySelection(const Graphic3d_Vec2i& thePnt, bool theToAppend) void AIS_ViewController::UpdatePolySelection(const Graphic3d_Vec2i& thePnt, bool theToAppend)
{ {
if (myUI.Selection.Tool != AIS_ViewSelectionTool_Polygon) if (myUI.Selection.Tool != AIS_ViewSelectionTool_Polygon)
@ -635,10 +613,8 @@ void AIS_ViewController::UpdatePolySelection(const Graphic3d_Vec2i& thePnt, bool
} }
} }
// ======================================================================= //=================================================================================================
// function : UpdateZoom
// purpose :
// =======================================================================
bool AIS_ViewController::UpdateZoom(const Aspect_ScrollDelta& theDelta) bool AIS_ViewController::UpdateZoom(const Aspect_ScrollDelta& theDelta)
{ {
if (!myUI.ZoomActions.IsEmpty()) if (!myUI.ZoomActions.IsEmpty())
@ -654,10 +630,8 @@ bool AIS_ViewController::UpdateZoom(const Aspect_ScrollDelta& theDelta)
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : UpdateZRotation
// purpose :
// =======================================================================
bool AIS_ViewController::UpdateZRotation(double theAngle) bool AIS_ViewController::UpdateZRotation(double theAngle)
{ {
if (!ToAllowTouchZRotation()) if (!ToAllowTouchZRotation())
@ -674,10 +648,8 @@ bool AIS_ViewController::UpdateZRotation(double theAngle)
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : UpdateMouseScroll
// purpose :
// =======================================================================
bool AIS_ViewController::UpdateMouseScroll(const Aspect_ScrollDelta& theDelta) bool AIS_ViewController::UpdateMouseScroll(const Aspect_ScrollDelta& theDelta)
{ {
Aspect_ScrollDelta aDelta = theDelta; Aspect_ScrollDelta aDelta = theDelta;
@ -685,10 +657,8 @@ bool AIS_ViewController::UpdateMouseScroll(const Aspect_ScrollDelta& theDelta)
return UpdateZoom(aDelta); return UpdateZoom(aDelta);
} }
// ======================================================================= //=================================================================================================
// function : UpdateMouseClick
// purpose :
// =======================================================================
bool AIS_ViewController::UpdateMouseClick(const Graphic3d_Vec2i& thePoint, bool AIS_ViewController::UpdateMouseClick(const Graphic3d_Vec2i& thePoint,
Aspect_VKeyMouse theButton, Aspect_VKeyMouse theButton,
Aspect_VKeyFlags theModifiers, Aspect_VKeyFlags theModifiers,
@ -710,10 +680,8 @@ bool AIS_ViewController::UpdateMouseClick(const Graphic3d_Vec2i& thePoint,
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : UpdateMouseButtons
// purpose :
// =======================================================================
bool AIS_ViewController::UpdateMouseButtons(const Graphic3d_Vec2i& thePoint, bool AIS_ViewController::UpdateMouseButtons(const Graphic3d_Vec2i& thePoint,
Aspect_VKeyMouse theButtons, Aspect_VKeyMouse theButtons,
Aspect_VKeyFlags theModifiers, Aspect_VKeyFlags theModifiers,
@ -912,10 +880,8 @@ bool AIS_ViewController::UpdateMouseButtons(const Graphic3d_Vec2i& thePoint,
return toUpdateView; return toUpdateView;
} }
// ======================================================================= //=================================================================================================
// function : UpdateMousePosition
// purpose :
// =======================================================================
bool AIS_ViewController::UpdateMousePosition(const Graphic3d_Vec2i& thePoint, bool AIS_ViewController::UpdateMousePosition(const Graphic3d_Vec2i& thePoint,
Aspect_VKeyMouse theButtons, Aspect_VKeyMouse theButtons,
Aspect_VKeyFlags theModifiers, Aspect_VKeyFlags theModifiers,
@ -1135,10 +1101,8 @@ bool AIS_ViewController::UpdateMousePosition(const Graphic3d_Vec2i& thePoint,
return toUpdateView; return toUpdateView;
} }
// ======================================================================= //=================================================================================================
// function : AddTouchPoint
// purpose :
// =======================================================================
void AIS_ViewController::AddTouchPoint(Standard_Size theId, void AIS_ViewController::AddTouchPoint(Standard_Size theId,
const Graphic3d_Vec2d& thePnt, const Graphic3d_Vec2d& thePnt,
Standard_Boolean theClearBefore) Standard_Boolean theClearBefore)
@ -1168,10 +1132,8 @@ void AIS_ViewController::AddTouchPoint(Standard_Size theId,
myUI.IsNewGesture = true; myUI.IsNewGesture = true;
} }
// ======================================================================= //=================================================================================================
// function : RemoveTouchPoint
// purpose :
// =======================================================================
bool AIS_ViewController::RemoveTouchPoint(Standard_Size theId, Standard_Boolean theClearSelectPnts) bool AIS_ViewController::RemoveTouchPoint(Standard_Size theId, Standard_Boolean theClearSelectPnts)
{ {
if (!Aspect_WindowInputListener::RemoveTouchPoint(theId, theClearSelectPnts)) if (!Aspect_WindowInputListener::RemoveTouchPoint(theId, theClearSelectPnts))
@ -1233,10 +1195,8 @@ bool AIS_ViewController::RemoveTouchPoint(Standard_Size theId, Standard_Boolean
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : UpdateTouchPoint
// purpose :
// =======================================================================
void AIS_ViewController::UpdateTouchPoint(Standard_Size theId, const Graphic3d_Vec2d& thePnt) void AIS_ViewController::UpdateTouchPoint(Standard_Size theId, const Graphic3d_Vec2d& thePnt)
{ {
Aspect_WindowInputListener::UpdateTouchPoint(theId, thePnt); Aspect_WindowInputListener::UpdateTouchPoint(theId, thePnt);
@ -1248,10 +1208,8 @@ void AIS_ViewController::UpdateTouchPoint(Standard_Size theId, const Graphic3d_V
} }
} }
// ======================================================================= //=================================================================================================
// function : Update3dMouse
// purpose :
// =======================================================================
bool AIS_ViewController::Update3dMouse(const WNT_HIDSpaceMouse& theEvent) bool AIS_ViewController::Update3dMouse(const WNT_HIDSpaceMouse& theEvent)
{ {
bool toUpdate = false; bool toUpdate = false;
@ -1261,10 +1219,8 @@ bool AIS_ViewController::Update3dMouse(const WNT_HIDSpaceMouse& theEvent)
return toUpdate; return toUpdate;
} }
// ======================================================================= //=================================================================================================
// function : SetNavigationMode
// purpose :
// =======================================================================
void AIS_ViewController::SetNavigationMode(AIS_NavigationMode theMode) void AIS_ViewController::SetNavigationMode(AIS_NavigationMode theMode)
{ {
myNavigationMode = theMode; myNavigationMode = theMode;
@ -1276,28 +1232,22 @@ void AIS_ViewController::SetNavigationMode(AIS_NavigationMode theMode)
myUI.ViewRotation.ToRotate = false; myUI.ViewRotation.ToRotate = false;
} }
// ======================================================================= //=================================================================================================
// function : KeyDown
// purpose :
// =======================================================================
void AIS_ViewController::KeyDown(Aspect_VKey theKey, double theTime, double thePressure) void AIS_ViewController::KeyDown(Aspect_VKey theKey, double theTime, double thePressure)
{ {
Aspect_WindowInputListener::KeyDown(theKey, theTime, thePressure); Aspect_WindowInputListener::KeyDown(theKey, theTime, thePressure);
} }
// ======================================================================= //=================================================================================================
// function : KeyUp
// purpose :
// =======================================================================
void AIS_ViewController::KeyUp(Aspect_VKey theKey, double theTime) void AIS_ViewController::KeyUp(Aspect_VKey theKey, double theTime)
{ {
Aspect_WindowInputListener::KeyUp(theKey, theTime); Aspect_WindowInputListener::KeyUp(theKey, theTime);
} }
// ======================================================================= //=================================================================================================
// function : KeyFromAxis
// purpose :
// =======================================================================
void AIS_ViewController::KeyFromAxis(Aspect_VKey theNegative, void AIS_ViewController::KeyFromAxis(Aspect_VKey theNegative,
Aspect_VKey thePositive, Aspect_VKey thePositive,
double theTime, double theTime,
@ -1306,10 +1256,8 @@ void AIS_ViewController::KeyFromAxis(Aspect_VKey theNegative,
Aspect_WindowInputListener::KeyFromAxis(theNegative, thePositive, theTime, thePressure); Aspect_WindowInputListener::KeyFromAxis(theNegative, thePositive, theTime, thePressure);
} }
// ======================================================================= //=================================================================================================
// function : FetchNavigationKeys
// purpose :
// =======================================================================
AIS_WalkDelta AIS_ViewController::FetchNavigationKeys(Standard_Real theCrouchRatio, AIS_WalkDelta AIS_ViewController::FetchNavigationKeys(Standard_Real theCrouchRatio,
Standard_Real theRunRatio) Standard_Real theRunRatio)
{ {
@ -1456,10 +1404,8 @@ AIS_WalkDelta AIS_ViewController::FetchNavigationKeys(Standard_Real theCrouchRat
return aWalk; return aWalk;
} }
// ======================================================================= //=================================================================================================
// function : AbortViewAnimation
// purpose :
// =======================================================================
void AIS_ViewController::AbortViewAnimation() void AIS_ViewController::AbortViewAnimation()
{ {
if (!myViewAnimation.IsNull() && !myViewAnimation->IsStopped()) if (!myViewAnimation.IsNull() && !myViewAnimation->IsStopped())
@ -1469,10 +1415,8 @@ void AIS_ViewController::AbortViewAnimation()
} }
} }
// ======================================================================= //=================================================================================================
// function : handlePanning
// purpose :
// =======================================================================
void AIS_ViewController::handlePanning(const Handle(V3d_View)& theView) void AIS_ViewController::handlePanning(const Handle(V3d_View)& theView)
{ {
if (!myGL.Panning.ToPan || !myToAllowPanning) if (!myGL.Panning.ToPan || !myToAllowPanning)
@ -1513,10 +1457,8 @@ void AIS_ViewController::handlePanning(const Handle(V3d_View)& theView)
theView->View()->SynchronizeXRPosedToBaseCamera(); theView->View()->SynchronizeXRPosedToBaseCamera();
} }
// ======================================================================= //=================================================================================================
// function : handleZRotate
// purpose :
// =======================================================================
void AIS_ViewController::handleZRotate(const Handle(V3d_View)& theView) void AIS_ViewController::handleZRotate(const Handle(V3d_View)& theView)
{ {
if (!myGL.ZRotate.ToRotate || !myToAllowRotation) if (!myGL.ZRotate.ToRotate || !myToAllowRotation)
@ -1536,10 +1478,8 @@ void AIS_ViewController::handleZRotate(const Handle(V3d_View)& theView)
theView->View()->SynchronizeXRPosedToBaseCamera(); theView->View()->SynchronizeXRPosedToBaseCamera();
} }
// ======================================================================= //=================================================================================================
// function : handleZoom
// purpose :
// =======================================================================
void AIS_ViewController::handleZoom(const Handle(V3d_View)& theView, void AIS_ViewController::handleZoom(const Handle(V3d_View)& theView,
const Aspect_ScrollDelta& theParams, const Aspect_ScrollDelta& theParams,
const gp_Pnt* thePnt) const gp_Pnt* thePnt)
@ -1643,10 +1583,8 @@ void AIS_ViewController::handleZoom(const Handle(V3d_View)& theView,
theView->View()->SynchronizeXRPosedToBaseCamera(); theView->View()->SynchronizeXRPosedToBaseCamera();
} }
// ======================================================================= //=================================================================================================
// function : handleZFocusScroll
// purpose :
// =======================================================================
void AIS_ViewController::handleZFocusScroll(const Handle(V3d_View)& theView, void AIS_ViewController::handleZFocusScroll(const Handle(V3d_View)& theView,
const Aspect_ScrollDelta& theParams) const Aspect_ScrollDelta& theParams)
{ {
@ -1663,10 +1601,8 @@ void AIS_ViewController::handleZFocusScroll(const Handle(V3d_View)& theView,
} }
} }
// ======================================================================= //=================================================================================================
// function : handleOrbitRotation
// purpose :
// =======================================================================
void AIS_ViewController::handleOrbitRotation(const Handle(V3d_View)& theView, void AIS_ViewController::handleOrbitRotation(const Handle(V3d_View)& theView,
const gp_Pnt& thePnt, const gp_Pnt& thePnt,
bool theToLockZUp) bool theToLockZUp)
@ -1815,10 +1751,8 @@ void AIS_ViewController::handleOrbitRotation(const Handle(V3d_View)& theView,
theView->View()->SynchronizeXRBaseToPosedCamera(); theView->View()->SynchronizeXRBaseToPosedCamera();
} }
// ======================================================================= //=================================================================================================
// function : handleViewRotation
// purpose :
// =======================================================================
void AIS_ViewController::handleViewRotation(const Handle(V3d_View)& theView, void AIS_ViewController::handleViewRotation(const Handle(V3d_View)& theView,
double theYawExtra, double theYawExtra,
double thePitchExtra, double thePitchExtra,
@ -1891,10 +1825,8 @@ void AIS_ViewController::handleViewRotation(const Handle(V3d_View)& theView,
theView->Invalidate(); theView->Invalidate();
} }
// ======================================================================= //=================================================================================================
// function : PickPoint
// purpose :
// =======================================================================
bool AIS_ViewController::PickPoint(gp_Pnt& thePnt, bool AIS_ViewController::PickPoint(gp_Pnt& thePnt,
const Handle(AIS_InteractiveContext)& theCtx, const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
@ -1923,10 +1855,8 @@ bool AIS_ViewController::PickPoint(gp_Pnt& thePnt,
&& !Precision::IsInfinite(thePnt.Z()); && !Precision::IsInfinite(thePnt.Z());
} }
// ======================================================================= //=================================================================================================
// function : PickAxis
// purpose :
// =======================================================================
bool AIS_ViewController::PickAxis(gp_Pnt& theTopPnt, bool AIS_ViewController::PickAxis(gp_Pnt& theTopPnt,
const Handle(AIS_InteractiveContext)& theCtx, const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
@ -1947,10 +1877,8 @@ bool AIS_ViewController::PickAxis(gp_Pnt& theTopPn
&& !Precision::IsInfinite(theTopPnt.Z()); && !Precision::IsInfinite(theTopPnt.Z());
} }
// ======================================================================= //=================================================================================================
// function : GravityPoint
// purpose :
// =======================================================================
gp_Pnt AIS_ViewController::GravityPoint(const Handle(AIS_InteractiveContext)& theCtx, gp_Pnt AIS_ViewController::GravityPoint(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -1993,10 +1921,8 @@ gp_Pnt AIS_ViewController::GravityPoint(const Handle(AIS_InteractiveContext)& th
return theCtx->GravityPoint(theView); return theCtx->GravityPoint(theView);
} }
// ======================================================================= //=================================================================================================
// function : FitAllAuto
// purpose :
// =======================================================================
void AIS_ViewController::FitAllAuto(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::FitAllAuto(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -2031,10 +1957,8 @@ void AIS_ViewController::FitAllAuto(const Handle(AIS_InteractiveContext)& theCtx
} }
} }
// ======================================================================= //=================================================================================================
// function : handleViewOrientationKeys
// purpose :
// =======================================================================
void AIS_ViewController::handleViewOrientationKeys(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleViewOrientationKeys(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -2123,10 +2047,8 @@ void AIS_ViewController::handleViewOrientationKeys(const Handle(AIS_InteractiveC
} }
} }
// ======================================================================= //=================================================================================================
// function : handleNavigationKeys
// purpose :
// =======================================================================
AIS_WalkDelta AIS_ViewController::handleNavigationKeys(const Handle(AIS_InteractiveContext)&, AIS_WalkDelta AIS_ViewController::handleNavigationKeys(const Handle(AIS_InteractiveContext)&,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -2256,10 +2178,8 @@ AIS_WalkDelta AIS_ViewController::handleNavigationKeys(const Handle(AIS_Interact
return aWalk; return aWalk;
} }
// ======================================================================= //=================================================================================================
// function : handleCameraActions
// purpose :
// =======================================================================
void AIS_ViewController::handleCameraActions(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleCameraActions(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
const AIS_WalkDelta& theWalk) const AIS_WalkDelta& theWalk)
@ -2472,10 +2392,8 @@ void AIS_ViewController::handleCameraActions(const Handle(AIS_InteractiveContext
} }
} }
// ======================================================================= //=================================================================================================
// function : handleXRInput
// purpose :
// =======================================================================
void AIS_ViewController::handleXRInput(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleXRInput(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
const AIS_WalkDelta&) const AIS_WalkDelta&)
@ -2490,10 +2408,8 @@ void AIS_ViewController::handleXRInput(const Handle(AIS_InteractiveContext)& the
handleXRPicking(theCtx, theView); handleXRPicking(theCtx, theView);
} }
// ======================================================================= //=================================================================================================
// function : handleXRTurnPad
// purpose :
// =======================================================================
void AIS_ViewController::handleXRTurnPad(const Handle(AIS_InteractiveContext)&, void AIS_ViewController::handleXRTurnPad(const Handle(AIS_InteractiveContext)&,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -2533,10 +2449,8 @@ void AIS_ViewController::handleXRTurnPad(const Handle(AIS_InteractiveContext)&,
} }
} }
// ======================================================================= //=================================================================================================
// function : handleXRTeleport
// purpose :
// =======================================================================
void AIS_ViewController::handleXRTeleport(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleXRTeleport(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -2670,10 +2584,8 @@ void AIS_ViewController::handleXRTeleport(const Handle(AIS_InteractiveContext)&
} }
} }
// ======================================================================= //=================================================================================================
// function : handleXRPicking
// purpose :
// =======================================================================
void AIS_ViewController::handleXRPicking(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleXRPicking(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -2726,20 +2638,16 @@ void AIS_ViewController::handleXRPicking(const Handle(AIS_InteractiveContext)& t
} }
} }
// ======================================================================= //=================================================================================================
// function : OnSelectionChanged
// purpose :
// =======================================================================
void AIS_ViewController::OnSelectionChanged(const Handle(AIS_InteractiveContext)&, void AIS_ViewController::OnSelectionChanged(const Handle(AIS_InteractiveContext)&,
const Handle(V3d_View)&) const Handle(V3d_View)&)
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : OnSubviewChanged
// purpose :
// =======================================================================
void AIS_ViewController::OnSubviewChanged(const Handle(AIS_InteractiveContext)&, void AIS_ViewController::OnSubviewChanged(const Handle(AIS_InteractiveContext)&,
const Handle(V3d_View)&, const Handle(V3d_View)&,
const Handle(V3d_View)&) const Handle(V3d_View)&)
@ -2747,10 +2655,8 @@ void AIS_ViewController::OnSubviewChanged(const Handle(AIS_InteractiveContext)&,
// //
} }
// ======================================================================= //=================================================================================================
// function : OnObjectDragged
// purpose :
// =======================================================================
void AIS_ViewController::OnObjectDragged(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::OnObjectDragged(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
AIS_DragAction theAction) AIS_DragAction theAction)
@ -2857,10 +2763,8 @@ void AIS_ViewController::OnObjectDragged(const Handle(AIS_InteractiveContext)& t
} }
} }
// ======================================================================= //=================================================================================================
// function : contextLazyMoveTo
// purpose :
// =======================================================================
void AIS_ViewController::contextLazyMoveTo(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::contextLazyMoveTo(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
const Graphic3d_Vec2i& thePnt) const Graphic3d_Vec2i& thePnt)
@ -2914,10 +2818,8 @@ void AIS_ViewController::contextLazyMoveTo(const Handle(AIS_InteractiveContext)&
} }
} }
// ======================================================================= //=================================================================================================
// function : handleSelectionPick
// purpose :
// =======================================================================
void AIS_ViewController::handleSelectionPick(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleSelectionPick(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -2946,10 +2848,8 @@ void AIS_ViewController::handleSelectionPick(const Handle(AIS_InteractiveContext
} }
} }
// ======================================================================= //=================================================================================================
// function : handleSelectionPoly
// purpose :
// =======================================================================
void AIS_ViewController::handleSelectionPoly(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleSelectionPoly(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -3074,10 +2974,8 @@ void AIS_ViewController::handleSelectionPoly(const Handle(AIS_InteractiveContext
} }
} }
// ======================================================================= //=================================================================================================
// function : handleDynamicHighlight
// purpose :
// =======================================================================
void AIS_ViewController::handleDynamicHighlight(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleDynamicHighlight(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -3142,10 +3040,8 @@ void AIS_ViewController::handleDynamicHighlight(const Handle(AIS_InteractiveCont
} }
} }
// ======================================================================= //=================================================================================================
// function : handleMoveTo
// purpose :
// =======================================================================
void AIS_ViewController::handleMoveTo(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleMoveTo(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -3154,10 +3050,8 @@ void AIS_ViewController::handleMoveTo(const Handle(AIS_InteractiveContext)& theC
handleSelectionPoly(theCtx, theView); handleSelectionPoly(theCtx, theView);
} }
// ======================================================================= //=================================================================================================
// function : handleViewRedraw
// purpose :
// =======================================================================
void AIS_ViewController::handleViewRedraw(const Handle(AIS_InteractiveContext)&, void AIS_ViewController::handleViewRedraw(const Handle(AIS_InteractiveContext)&,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -3265,10 +3159,8 @@ void AIS_ViewController::handleViewRedraw(const Handle(AIS_InteractiveContext)&,
} }
} }
// ======================================================================= //=================================================================================================
// function : handleXRMoveTo
// purpose :
// =======================================================================
Standard_Integer AIS_ViewController::handleXRMoveTo(const Handle(AIS_InteractiveContext)& theCtx, Standard_Integer AIS_ViewController::handleXRMoveTo(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView, const Handle(V3d_View)& theView,
const gp_Trsf& thePose, const gp_Trsf& thePose,
@ -3297,10 +3189,8 @@ Standard_Integer AIS_ViewController::handleXRMoveTo(const Handle(AIS_Interactive
return aPickResult; return aPickResult;
} }
// ======================================================================= //=================================================================================================
// function : handleXRHighlight
// purpose :
// =======================================================================
void AIS_ViewController::handleXRHighlight(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleXRHighlight(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -3347,10 +3237,8 @@ void AIS_ViewController::handleXRHighlight(const Handle(AIS_InteractiveContext)&
} }
} }
// ======================================================================= //=================================================================================================
// function : handleXRPresentations
// purpose :
// =======================================================================
void AIS_ViewController::handleXRPresentations(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::handleXRPresentations(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {
@ -3509,10 +3397,8 @@ void AIS_ViewController::handleXRPresentations(const Handle(AIS_InteractiveConte
} }
} }
// ======================================================================= //=================================================================================================
// function : HandleViewEvents
// purpose :
// =======================================================================
void AIS_ViewController::HandleViewEvents(const Handle(AIS_InteractiveContext)& theCtx, void AIS_ViewController::HandleViewEvents(const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView) const Handle(V3d_View)& theView)
{ {

View File

@ -58,10 +58,8 @@ Quantity_Color Aspect_Background::Color() const
return (MyColor); return (MyColor);
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Aspect_Background::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const void Aspect_Background::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_CLASS_BEGIN(theOStream, Aspect_Background) OCCT_DUMP_CLASS_BEGIN(theOStream, Aspect_Background)

View File

@ -23,10 +23,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Aspect_DisplayConnection, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Aspect_DisplayConnection, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Aspect_DisplayConnection
// purpose :
// =======================================================================
Aspect_DisplayConnection::Aspect_DisplayConnection() Aspect_DisplayConnection::Aspect_DisplayConnection()
{ {
#if defined(HAVE_XLIB) #if defined(HAVE_XLIB)
@ -40,10 +38,8 @@ Aspect_DisplayConnection::Aspect_DisplayConnection()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : ~Aspect_DisplayConnection
// purpose :
// =======================================================================
Aspect_DisplayConnection::~Aspect_DisplayConnection() Aspect_DisplayConnection::~Aspect_DisplayConnection()
{ {
#if defined(HAVE_XLIB) #if defined(HAVE_XLIB)
@ -58,10 +54,8 @@ Aspect_DisplayConnection::~Aspect_DisplayConnection()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : Aspect_DisplayConnection
// purpose :
// =======================================================================
Aspect_DisplayConnection::Aspect_DisplayConnection(const TCollection_AsciiString& theDisplayName) Aspect_DisplayConnection::Aspect_DisplayConnection(const TCollection_AsciiString& theDisplayName)
: myDisplay(NULL), : myDisplay(NULL),
myDefVisualInfo(NULL), myDefVisualInfo(NULL),
@ -72,10 +66,8 @@ Aspect_DisplayConnection::Aspect_DisplayConnection(const TCollection_AsciiString
Init(NULL); Init(NULL);
} }
// ======================================================================= //=================================================================================================
// function : Aspect_DisplayConnection
// purpose :
// =======================================================================
Aspect_DisplayConnection::Aspect_DisplayConnection(Aspect_XDisplay* theDisplay) Aspect_DisplayConnection::Aspect_DisplayConnection(Aspect_XDisplay* theDisplay)
: myDisplay(NULL), : myDisplay(NULL),
myDefVisualInfo(NULL), myDefVisualInfo(NULL),
@ -85,10 +77,8 @@ Aspect_DisplayConnection::Aspect_DisplayConnection(Aspect_XDisplay* theDisplay)
Init(theDisplay); Init(theDisplay);
} }
// ======================================================================= //=================================================================================================
// function : SetDefaultVisualInfo
// purpose :
// =======================================================================
void Aspect_DisplayConnection::SetDefaultVisualInfo(Aspect_XVisualInfo* theVisual, void Aspect_DisplayConnection::SetDefaultVisualInfo(Aspect_XVisualInfo* theVisual,
Aspect_FBConfig theFBConfig) Aspect_FBConfig theFBConfig)
{ {
@ -102,10 +92,8 @@ void Aspect_DisplayConnection::SetDefaultVisualInfo(Aspect_XVisualInfo* theVisua
myDefFBConfig = theFBConfig; myDefFBConfig = theFBConfig;
} }
// ======================================================================= //=================================================================================================
// function : Init
// purpose :
// =======================================================================
void Aspect_DisplayConnection::Init(Aspect_XDisplay* theDisplay) void Aspect_DisplayConnection::Init(Aspect_XDisplay* theDisplay)
{ {
#if defined(HAVE_XLIB) #if defined(HAVE_XLIB)

View File

@ -19,10 +19,8 @@
#include <Standard_Dump.hxx> #include <Standard_Dump.hxx>
// ======================================================================= //=================================================================================================
// function : Aspect_GenId
// purpose :
// =======================================================================
Aspect_GenId::Aspect_GenId() Aspect_GenId::Aspect_GenId()
: myFreeCount(INT_MAX / 2 + 1), : myFreeCount(INT_MAX / 2 + 1),
myLength(INT_MAX / 2 + 1), myLength(INT_MAX / 2 + 1),
@ -32,10 +30,8 @@ Aspect_GenId::Aspect_GenId()
// //
} }
// ======================================================================= //=================================================================================================
// function : Aspect_GenId
// purpose :
// =======================================================================
Aspect_GenId::Aspect_GenId(const Standard_Integer theLow, const Standard_Integer theUpper) Aspect_GenId::Aspect_GenId(const Standard_Integer theLow, const Standard_Integer theUpper)
: myFreeCount(theUpper - theLow + 1), : myFreeCount(theUpper - theLow + 1),
myLength(theUpper - theLow + 1), myLength(theUpper - theLow + 1),
@ -48,20 +44,16 @@ Aspect_GenId::Aspect_GenId(const Standard_Integer theLow, const Standard_Integer
} }
} }
// ======================================================================= //=================================================================================================
// function : Free
// purpose :
// =======================================================================
void Aspect_GenId::Free() void Aspect_GenId::Free()
{ {
myFreeCount = myLength; myFreeCount = myLength;
myFreeIds.Clear(); myFreeIds.Clear();
} }
// ======================================================================= //=================================================================================================
// function : Free
// purpose :
// =======================================================================
void Aspect_GenId::Free(const Standard_Integer theId) void Aspect_GenId::Free(const Standard_Integer theId)
{ {
if (theId >= myLowerBound && theId <= myUpperBound) if (theId >= myLowerBound && theId <= myUpperBound)
@ -78,10 +70,8 @@ void Aspect_GenId::Free(const Standard_Integer theId)
} }
} }
// ======================================================================= //=================================================================================================
// function : Next
// purpose :
// =======================================================================
Standard_Integer Aspect_GenId::Next() Standard_Integer Aspect_GenId::Next()
{ {
Standard_Integer aNewId = 0; Standard_Integer aNewId = 0;
@ -92,10 +82,8 @@ Standard_Integer Aspect_GenId::Next()
return aNewId; return aNewId;
} }
// ======================================================================= //=================================================================================================
// function : Next
// purpose :
// =======================================================================
Standard_Boolean Aspect_GenId::Next(Standard_Integer& theId) Standard_Boolean Aspect_GenId::Next(Standard_Integer& theId)
{ {
if (!myFreeIds.IsEmpty()) if (!myFreeIds.IsEmpty())
@ -114,10 +102,8 @@ Standard_Boolean Aspect_GenId::Next(Standard_Integer& theId)
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Aspect_GenId::DumpJson(Standard_OStream& theOStream, Standard_Integer) const void Aspect_GenId::DumpJson(Standard_OStream& theOStream, Standard_Integer) const
{ {
OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, myFreeCount) OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, myFreeCount)

View File

@ -54,10 +54,8 @@ Aspect_GradientFillMethod Aspect_GradientBackground::BgGradientFillMethod() cons
return MyGradientMethod; return MyGradientMethod;
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Aspect_GradientBackground::DumpJson(Standard_OStream& theOStream, void Aspect_GradientBackground::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {

View File

@ -15,10 +15,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Aspect_NeutralWindow, Aspect_Window) IMPLEMENT_STANDARD_RTTIEXT(Aspect_NeutralWindow, Aspect_Window)
// ======================================================================= //=================================================================================================
// function : Aspect_NeutralWindow
// purpose :
// =======================================================================
Aspect_NeutralWindow::Aspect_NeutralWindow() Aspect_NeutralWindow::Aspect_NeutralWindow()
: myHandle(0), : myHandle(0),
myParentHandle(0), myParentHandle(0),
@ -31,10 +29,8 @@ Aspect_NeutralWindow::Aspect_NeutralWindow()
{ {
} }
// ======================================================================= //=================================================================================================
// function : SetNativeHandles
// purpose :
// =======================================================================
Standard_Boolean Aspect_NeutralWindow::SetNativeHandles(Aspect_Drawable theWindow, Standard_Boolean Aspect_NeutralWindow::SetNativeHandles(Aspect_Drawable theWindow,
Aspect_Drawable theParentWindow, Aspect_Drawable theParentWindow,
Aspect_FBConfig theFbConfig) Aspect_FBConfig theFbConfig)
@ -50,10 +46,8 @@ Standard_Boolean Aspect_NeutralWindow::SetNativeHandles(Aspect_Drawable theWindo
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : SetPosition
// purpose :
// =======================================================================
Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, Standard_Integer theY1) Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, Standard_Integer theY1)
{ {
if (myPosX == theX1 && myPosY == theY1) if (myPosX == theX1 && myPosY == theY1)
@ -66,10 +60,8 @@ Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, Stand
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : SetPosition
// purpose :
// =======================================================================
Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1, Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1,
Standard_Integer theY1, Standard_Integer theY1,
Standard_Integer theX2, Standard_Integer theX2,
@ -89,10 +81,8 @@ Standard_Boolean Aspect_NeutralWindow::SetPosition(Standard_Integer theX1,
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : SetSize
// purpose :
// =======================================================================
Standard_Boolean Aspect_NeutralWindow::SetSize(const Standard_Integer theWidth, Standard_Boolean Aspect_NeutralWindow::SetSize(const Standard_Integer theWidth,
const Standard_Integer theHeight) const Standard_Integer theHeight)
{ {

View File

@ -341,10 +341,8 @@ private:
}; };
#endif #endif
// ======================================================================= //=================================================================================================
// function : IsHmdPresent
// purpose :
// =======================================================================
bool Aspect_OpenVRSession::IsHmdPresent() bool Aspect_OpenVRSession::IsHmdPresent()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -354,10 +352,8 @@ bool Aspect_OpenVRSession::IsHmdPresent()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : defaultActionsManifest
// purpose :
// =======================================================================
TCollection_AsciiString Aspect_OpenVRSession::defaultActionsManifest() TCollection_AsciiString Aspect_OpenVRSession::defaultActionsManifest()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -368,10 +364,8 @@ TCollection_AsciiString Aspect_OpenVRSession::defaultActionsManifest()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : Aspect_OpenVRSession
// purpose :
// =======================================================================
Aspect_OpenVRSession::Aspect_OpenVRSession() Aspect_OpenVRSession::Aspect_OpenVRSession()
: myContext(new VRContext()) : myContext(new VRContext())
{ {
@ -491,20 +485,16 @@ Aspect_OpenVRSession::Aspect_OpenVRSession()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : ~Aspect_OpenVRSession
// purpose :
// =======================================================================
Aspect_OpenVRSession::~Aspect_OpenVRSession() Aspect_OpenVRSession::~Aspect_OpenVRSession()
{ {
closeVR(); closeVR();
delete myContext; delete myContext;
} }
// ======================================================================= //=================================================================================================
// function : closeVR
// purpose :
// =======================================================================
void Aspect_OpenVRSession::closeVR() void Aspect_OpenVRSession::closeVR()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -516,10 +506,8 @@ void Aspect_OpenVRSession::closeVR()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : getVRSystem
// purpose :
// =======================================================================
void* Aspect_OpenVRSession::getVRSystem() const void* Aspect_OpenVRSession::getVRSystem() const
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -529,19 +517,15 @@ void* Aspect_OpenVRSession::getVRSystem() const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : Close
// purpose :
// =======================================================================
void Aspect_OpenVRSession::Close() void Aspect_OpenVRSession::Close()
{ {
closeVR(); closeVR();
} }
// ======================================================================= //=================================================================================================
// function : IsOpen
// purpose :
// =======================================================================
bool Aspect_OpenVRSession::IsOpen() const bool Aspect_OpenVRSession::IsOpen() const
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -551,10 +535,8 @@ bool Aspect_OpenVRSession::IsOpen() const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : Open
// purpose :
// =======================================================================
bool Aspect_OpenVRSession::Open() bool Aspect_OpenVRSession::Open()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -600,10 +582,8 @@ bool Aspect_OpenVRSession::Open()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : initInput
// purpose :
// =======================================================================
bool Aspect_OpenVRSession::initInput() bool Aspect_OpenVRSession::initInput()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -670,10 +650,8 @@ bool Aspect_OpenVRSession::initInput()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GetString
// purpose :
// =======================================================================
TCollection_AsciiString Aspect_OpenVRSession::GetString(InfoString theInfo) const TCollection_AsciiString Aspect_OpenVRSession::GetString(InfoString theInfo) const
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -706,10 +684,8 @@ TCollection_AsciiString Aspect_OpenVRSession::GetString(InfoString theInfo) cons
return TCollection_AsciiString(); return TCollection_AsciiString();
} }
// ======================================================================= //=================================================================================================
// function : NamedTrackedDevice
// purpose :
// =======================================================================
Standard_Integer Aspect_OpenVRSession::NamedTrackedDevice( Standard_Integer Aspect_OpenVRSession::NamedTrackedDevice(
Aspect_XRTrackedDeviceRole theDevice) const Aspect_XRTrackedDeviceRole theDevice) const
{ {
@ -745,10 +721,8 @@ Standard_Integer Aspect_OpenVRSession::NamedTrackedDevice(
return -1; return -1;
} }
// ======================================================================= //=================================================================================================
// function : loadRenderModel
// purpose :
// =======================================================================
Handle(Graphic3d_ArrayOfTriangles) Aspect_OpenVRSession::loadRenderModel( Handle(Graphic3d_ArrayOfTriangles) Aspect_OpenVRSession::loadRenderModel(
Standard_Integer theDevice, Standard_Integer theDevice,
Standard_Boolean theToApplyUnitFactor, Standard_Boolean theToApplyUnitFactor,
@ -823,10 +797,8 @@ Handle(Graphic3d_ArrayOfTriangles) Aspect_OpenVRSession::loadRenderModel(
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : EyeToHeadTransform
// purpose :
// =======================================================================
NCollection_Mat4<double> Aspect_OpenVRSession::EyeToHeadTransform(Aspect_Eye theEye) const NCollection_Mat4<double> Aspect_OpenVRSession::EyeToHeadTransform(Aspect_Eye theEye) const
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -849,10 +821,8 @@ NCollection_Mat4<double> Aspect_OpenVRSession::EyeToHeadTransform(Aspect_Eye the
return NCollection_Mat4<double>(); return NCollection_Mat4<double>();
} }
// ======================================================================= //=================================================================================================
// function : ProjectionMatrix
// purpose :
// =======================================================================
NCollection_Mat4<double> Aspect_OpenVRSession::ProjectionMatrix(Aspect_Eye theEye, NCollection_Mat4<double> Aspect_OpenVRSession::ProjectionMatrix(Aspect_Eye theEye,
double theZNear, double theZNear,
double theZFar) const double theZFar) const
@ -874,10 +844,8 @@ NCollection_Mat4<double> Aspect_OpenVRSession::ProjectionMatrix(Aspect_Eye theEy
return NCollection_Mat4<double>(); return NCollection_Mat4<double>();
} }
// ======================================================================= //=================================================================================================
// function : updateProjectionFrustums
// purpose :
// =======================================================================
void Aspect_OpenVRSession::updateProjectionFrustums() void Aspect_OpenVRSession::updateProjectionFrustums()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -913,10 +881,8 @@ void Aspect_OpenVRSession::updateProjectionFrustums()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : SetTrackingOrigin
// purpose :
// =======================================================================
void Aspect_OpenVRSession::SetTrackingOrigin(TrackingUniverseOrigin theOrigin) void Aspect_OpenVRSession::SetTrackingOrigin(TrackingUniverseOrigin theOrigin)
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -938,10 +904,8 @@ void Aspect_OpenVRSession::SetTrackingOrigin(TrackingUniverseOrigin theOrigin)
myTrackOrigin = theOrigin; myTrackOrigin = theOrigin;
} }
// ======================================================================= //=================================================================================================
// function : WaitPoses
// purpose :
// =======================================================================
bool Aspect_OpenVRSession::WaitPoses() bool Aspect_OpenVRSession::WaitPoses()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -990,10 +954,8 @@ bool Aspect_OpenVRSession::WaitPoses()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GetDigitalActionData
// purpose :
// =======================================================================
Aspect_XRDigitalActionData Aspect_OpenVRSession::GetDigitalActionData( Aspect_XRDigitalActionData Aspect_OpenVRSession::GetDigitalActionData(
const Handle(Aspect_XRAction)& theAction) const const Handle(Aspect_XRAction)& theAction) const
{ {
@ -1030,10 +992,8 @@ Aspect_XRDigitalActionData Aspect_OpenVRSession::GetDigitalActionData(
return anActionData; return anActionData;
} }
// ======================================================================= //=================================================================================================
// function : GetAnalogActionData
// purpose :
// =======================================================================
Aspect_XRAnalogActionData Aspect_OpenVRSession::GetAnalogActionData( Aspect_XRAnalogActionData Aspect_OpenVRSession::GetAnalogActionData(
const Handle(Aspect_XRAction)& theAction) const const Handle(Aspect_XRAction)& theAction) const
{ {
@ -1069,10 +1029,8 @@ Aspect_XRAnalogActionData Aspect_OpenVRSession::GetAnalogActionData(
return anActionData; return anActionData;
} }
// ======================================================================= //=================================================================================================
// function : GetPoseActionDataForNextFrame
// purpose :
// =======================================================================
Aspect_XRPoseActionData Aspect_OpenVRSession::GetPoseActionDataForNextFrame( Aspect_XRPoseActionData Aspect_OpenVRSession::GetPoseActionDataForNextFrame(
const Handle(Aspect_XRAction)& theAction) const const Handle(Aspect_XRAction)& theAction) const
{ {
@ -1118,10 +1076,8 @@ Aspect_XRPoseActionData Aspect_OpenVRSession::GetPoseActionDataForNextFrame(
return anActionData; return anActionData;
} }
// ======================================================================= //=================================================================================================
// function : triggerHapticVibrationAction
// purpose :
// =======================================================================
void Aspect_OpenVRSession::triggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction, void Aspect_OpenVRSession::triggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction,
const Aspect_XRHapticActionData& theParams) const Aspect_XRHapticActionData& theParams)
{ {
@ -1160,10 +1116,8 @@ void Aspect_OpenVRSession::triggerHapticVibrationAction(const Handle(Aspect_XRAc
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : ProcessEvents
// purpose :
// =======================================================================
void Aspect_OpenVRSession::ProcessEvents() void Aspect_OpenVRSession::ProcessEvents()
{ {
#ifdef HAVE_OPENVR #ifdef HAVE_OPENVR
@ -1247,37 +1201,29 @@ void Aspect_OpenVRSession::ProcessEvents()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : onTrackedDeviceActivated
// purpose :
// =======================================================================
void Aspect_OpenVRSession::onTrackedDeviceActivated(Standard_Integer theDeviceIndex) void Aspect_OpenVRSession::onTrackedDeviceActivated(Standard_Integer theDeviceIndex)
{ {
Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " attached"); Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " attached");
} }
// ======================================================================= //=================================================================================================
// function : onTrackedDeviceDeactivated
// purpose :
// =======================================================================
void Aspect_OpenVRSession::onTrackedDeviceDeactivated(Standard_Integer theDeviceIndex) void Aspect_OpenVRSession::onTrackedDeviceDeactivated(Standard_Integer theDeviceIndex)
{ {
Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " detached"); Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " detached");
} }
// ======================================================================= //=================================================================================================
// function : onTrackedDeviceUpdated
// purpose :
// =======================================================================
void Aspect_OpenVRSession::onTrackedDeviceUpdated(Standard_Integer theDeviceIndex) void Aspect_OpenVRSession::onTrackedDeviceUpdated(Standard_Integer theDeviceIndex)
{ {
Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " updated"); Message::SendTrace(TCollection_AsciiString("OpenVR, Device ") + theDeviceIndex + " updated");
} }
// ======================================================================= //=================================================================================================
// function : SubmitEye
// purpose :
// =======================================================================
bool Aspect_OpenVRSession::SubmitEye(void* theTexture, bool Aspect_OpenVRSession::SubmitEye(void* theTexture,
Aspect_GraphicsLibrary theGraphicsLib, Aspect_GraphicsLibrary theGraphicsLib,
Aspect_ColorSpace theColorSpace, Aspect_ColorSpace theColorSpace,

View File

@ -17,10 +17,8 @@
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
// ======================================================================= //=================================================================================================
// function : Constructor
// purpose :
// =======================================================================
Aspect_SkydomeBackground::Aspect_SkydomeBackground() Aspect_SkydomeBackground::Aspect_SkydomeBackground()
: mySunDirection(0.0f, 1.0f, 0.0f), : mySunDirection(0.0f, 1.0f, 0.0f),
myCloudiness(0.2f), myCloudiness(0.2f),
@ -31,10 +29,8 @@ Aspect_SkydomeBackground::Aspect_SkydomeBackground()
// //
} }
// ======================================================================= //=================================================================================================
// function : Constructor
// purpose :
// =======================================================================
Aspect_SkydomeBackground::Aspect_SkydomeBackground(const gp_Dir& theSunDirection, Aspect_SkydomeBackground::Aspect_SkydomeBackground(const gp_Dir& theSunDirection,
Standard_ShortReal theCloudiness, Standard_ShortReal theCloudiness,
Standard_ShortReal theTime, Standard_ShortReal theTime,
@ -57,19 +53,15 @@ Aspect_SkydomeBackground::Aspect_SkydomeBackground(const gp_Dir& theSunDire
"Aspect_SkydomeBackground::Aspect_SkydomeBackground() theSize must be > 0"); "Aspect_SkydomeBackground::Aspect_SkydomeBackground() theSize must be > 0");
} }
// ======================================================================= //=================================================================================================
// function : ~Aspect_SkydomeBackground
// purpose :
// =======================================================================
Aspect_SkydomeBackground::~Aspect_SkydomeBackground() Aspect_SkydomeBackground::~Aspect_SkydomeBackground()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : SetCloudiness
// purpose :
// =======================================================================
void Aspect_SkydomeBackground::SetCloudiness(Standard_ShortReal theCloudiness) void Aspect_SkydomeBackground::SetCloudiness(Standard_ShortReal theCloudiness)
{ {
Standard_RangeError_Raise_if( Standard_RangeError_Raise_if(
@ -78,10 +70,8 @@ void Aspect_SkydomeBackground::SetCloudiness(Standard_ShortReal theCloudiness)
myCloudiness = theCloudiness; myCloudiness = theCloudiness;
} }
// ======================================================================= //=================================================================================================
// function : SetFogginess
// purpose :
// =======================================================================
void Aspect_SkydomeBackground::SetFogginess(Standard_ShortReal theFogginess) void Aspect_SkydomeBackground::SetFogginess(Standard_ShortReal theFogginess)
{ {
Standard_RangeError_Raise_if(theFogginess < 0, Standard_RangeError_Raise_if(theFogginess < 0,
@ -89,10 +79,8 @@ void Aspect_SkydomeBackground::SetFogginess(Standard_ShortReal theFogginess)
myFogginess = theFogginess; myFogginess = theFogginess;
} }
// ======================================================================= //=================================================================================================
// function : SetSize
// purpose :
// =======================================================================
void Aspect_SkydomeBackground::SetSize(Standard_Integer theSize) void Aspect_SkydomeBackground::SetSize(Standard_Integer theSize)
{ {
Standard_RangeError_Raise_if(theSize <= 0, Standard_RangeError_Raise_if(theSize <= 0,
@ -100,10 +88,8 @@ void Aspect_SkydomeBackground::SetSize(Standard_Integer theSize)
mySize = theSize; mySize = theSize;
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Aspect_SkydomeBackground::DumpJson(Standard_OStream& theOStream, void Aspect_SkydomeBackground::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {

View File

@ -15,10 +15,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Aspect_VKeySet, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Aspect_VKeySet, Standard_Transient)
// ================================================================ //=================================================================================================
// Function : As1pect_VKeySet
// Purpose :
// ================================================================
Aspect_VKeySet::Aspect_VKeySet() Aspect_VKeySet::Aspect_VKeySet()
: myKeys(0, Aspect_VKey_MAX), : myKeys(0, Aspect_VKey_MAX),
myModifiers(Aspect_VKeyFlags_NONE) myModifiers(Aspect_VKeyFlags_NONE)
@ -26,10 +24,8 @@ Aspect_VKeySet::Aspect_VKeySet()
// //
} }
// ================================================================ //=================================================================================================
// Function : Reset
// Purpose :
// ================================================================
void Aspect_VKeySet::Reset() void Aspect_VKeySet::Reset()
{ {
Standard_Mutex::Sentry aLock(myLock); Standard_Mutex::Sentry aLock(myLock);
@ -40,10 +36,8 @@ void Aspect_VKeySet::Reset()
} }
} }
// ================================================================ //=================================================================================================
// Function : KeyDown
// Purpose :
// ================================================================
void Aspect_VKeySet::KeyDown(Aspect_VKey theKey, double theTime, double thePressure) void Aspect_VKeySet::KeyDown(Aspect_VKey theKey, double theTime, double thePressure)
{ {
Standard_Mutex::Sentry aLock(myLock); Standard_Mutex::Sentry aLock(myLock);
@ -58,10 +52,8 @@ void Aspect_VKeySet::KeyDown(Aspect_VKey theKey, double theTime, double thePress
myModifiers = myModifiers | aModif; myModifiers = myModifiers | aModif;
} }
// ================================================================ //=================================================================================================
// Function : KeyUp
// Purpose :
// ================================================================
void Aspect_VKeySet::KeyUp(Aspect_VKey theKey, double theTime) void Aspect_VKeySet::KeyUp(Aspect_VKey theKey, double theTime)
{ {
Standard_Mutex::Sentry aLock(myLock); Standard_Mutex::Sentry aLock(myLock);
@ -78,10 +70,8 @@ void Aspect_VKeySet::KeyUp(Aspect_VKey theKey, double theTime)
} }
} }
// ================================================================ //=================================================================================================
// Function : KeyFromAxis
// Purpose :
// ================================================================
void Aspect_VKeySet::KeyFromAxis(Aspect_VKey theNegative, void Aspect_VKeySet::KeyFromAxis(Aspect_VKey theNegative,
Aspect_VKey thePositive, Aspect_VKey thePositive,
double theTime, double theTime,
@ -112,10 +102,8 @@ void Aspect_VKeySet::KeyFromAxis(Aspect_VKey theNegative,
} }
} }
// ================================================================ //=================================================================================================
// Function : HoldDuration
// Purpose :
// ================================================================
bool Aspect_VKeySet::HoldDuration(Aspect_VKey theKey, bool Aspect_VKeySet::HoldDuration(Aspect_VKey theKey,
double theTime, double theTime,
double& theDuration, double& theDuration,

View File

@ -15,10 +15,8 @@
#include <WNT_HIDSpaceMouse.hxx> #include <WNT_HIDSpaceMouse.hxx>
// ======================================================================= //=================================================================================================
// function : Aspect_WindowInputListener
// purpose :
// =======================================================================
Aspect_WindowInputListener::Aspect_WindowInputListener() Aspect_WindowInputListener::Aspect_WindowInputListener()
: myMousePressed(Aspect_VKeyMouse_NONE), : myMousePressed(Aspect_VKeyMouse_NONE),
myMouseModifiers(Aspect_VKeyFlags_NONE), myMouseModifiers(Aspect_VKeyFlags_NONE),
@ -33,37 +31,29 @@ Aspect_WindowInputListener::Aspect_WindowInputListener()
myEventTimer.Start(); myEventTimer.Start();
} }
// ======================================================================= //=================================================================================================
// function : ~Aspect_WindowInputListener
// purpose :
// =======================================================================
Aspect_WindowInputListener::~Aspect_WindowInputListener() Aspect_WindowInputListener::~Aspect_WindowInputListener()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : KeyDown
// purpose :
// =======================================================================
void Aspect_WindowInputListener::KeyDown(Aspect_VKey theKey, double theTime, double thePressure) void Aspect_WindowInputListener::KeyDown(Aspect_VKey theKey, double theTime, double thePressure)
{ {
myKeys.KeyDown(theKey, theTime, thePressure); myKeys.KeyDown(theKey, theTime, thePressure);
} }
// ======================================================================= //=================================================================================================
// function : KeyUp
// purpose :
// =======================================================================
void Aspect_WindowInputListener::KeyUp(Aspect_VKey theKey, double theTime) void Aspect_WindowInputListener::KeyUp(Aspect_VKey theKey, double theTime)
{ {
myKeys.KeyUp(theKey, theTime); myKeys.KeyUp(theKey, theTime);
} }
// ======================================================================= //=================================================================================================
// function : KeyFromAxis
// purpose :
// =======================================================================
void Aspect_WindowInputListener::KeyFromAxis(Aspect_VKey theNegative, void Aspect_WindowInputListener::KeyFromAxis(Aspect_VKey theNegative,
Aspect_VKey thePositive, Aspect_VKey thePositive,
double theTime, double theTime,
@ -72,10 +62,8 @@ void Aspect_WindowInputListener::KeyFromAxis(Aspect_VKey theNegative,
myKeys.KeyFromAxis(theNegative, thePositive, theTime, thePressure); myKeys.KeyFromAxis(theNegative, thePositive, theTime, thePressure);
} }
// ======================================================================= //=================================================================================================
// function : AddTouchPoint
// purpose :
// =======================================================================
void Aspect_WindowInputListener::AddTouchPoint(Standard_Size theId, void Aspect_WindowInputListener::AddTouchPoint(Standard_Size theId,
const Graphic3d_Vec2d& thePnt, const Graphic3d_Vec2d& thePnt,
Standard_Boolean theClearBefore) Standard_Boolean theClearBefore)
@ -88,10 +76,8 @@ void Aspect_WindowInputListener::AddTouchPoint(Standard_Size theId,
myTouchPoints.Add(theId, Aspect_Touch(thePnt, false)); myTouchPoints.Add(theId, Aspect_Touch(thePnt, false));
} }
// ======================================================================= //=================================================================================================
// function : RemoveTouchPoint
// purpose :
// =======================================================================
bool Aspect_WindowInputListener::RemoveTouchPoint(Standard_Size theId, bool Aspect_WindowInputListener::RemoveTouchPoint(Standard_Size theId,
Standard_Boolean theClearSelectPnts) Standard_Boolean theClearSelectPnts)
{ {
@ -119,10 +105,8 @@ bool Aspect_WindowInputListener::RemoveTouchPoint(Standard_Size theId,
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : UpdateTouchPoint
// purpose :
// =======================================================================
void Aspect_WindowInputListener::UpdateTouchPoint(Standard_Size theId, void Aspect_WindowInputListener::UpdateTouchPoint(Standard_Size theId,
const Graphic3d_Vec2d& thePnt) const Graphic3d_Vec2d& thePnt)
{ {
@ -136,10 +120,8 @@ void Aspect_WindowInputListener::UpdateTouchPoint(Standard_Size theId,
} }
} }
// ======================================================================= //=================================================================================================
// function : update3dMouseTranslation
// purpose :
// =======================================================================
bool Aspect_WindowInputListener::update3dMouseTranslation(const WNT_HIDSpaceMouse& theEvent) bool Aspect_WindowInputListener::update3dMouseTranslation(const WNT_HIDSpaceMouse& theEvent)
{ {
if (!theEvent.IsTranslation()) if (!theEvent.IsTranslation())
@ -157,10 +139,8 @@ bool Aspect_WindowInputListener::update3dMouseTranslation(const WNT_HIDSpaceMous
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : update3dMouseRotation
// purpose :
// =======================================================================
bool Aspect_WindowInputListener::update3dMouseRotation(const WNT_HIDSpaceMouse& theEvent) bool Aspect_WindowInputListener::update3dMouseRotation(const WNT_HIDSpaceMouse& theEvent)
{ {
if (!theEvent.IsRotation()) if (!theEvent.IsRotation())
@ -199,10 +179,8 @@ bool Aspect_WindowInputListener::update3dMouseRotation(const WNT_HIDSpaceMouse&
return toUpdate; return toUpdate;
} }
// ======================================================================= //=================================================================================================
// function : update3dMouseKeys
// purpose :
// =======================================================================
bool Aspect_WindowInputListener::update3dMouseKeys(const WNT_HIDSpaceMouse& theEvent) bool Aspect_WindowInputListener::update3dMouseKeys(const WNT_HIDSpaceMouse& theEvent)
{ {
bool toUpdate = false; bool toUpdate = false;

View File

@ -17,10 +17,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRSession, Standard_Transient)
IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRAction, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRAction, Standard_Transient)
IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRActionSet, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Aspect_XRActionSet, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Aspect_XRSession
// purpose :
// =======================================================================
Aspect_XRSession::Aspect_XRSession() Aspect_XRSession::Aspect_XRSession()
: myTrackOrigin(TrackingUniverseOrigin_Standing), : myTrackOrigin(TrackingUniverseOrigin_Standing),
myTrackedPoses(0, 0), myTrackedPoses(0, 0),
@ -36,19 +34,15 @@ Aspect_XRSession::Aspect_XRSession()
} }
} }
// ======================================================================= //=================================================================================================
// function : AbortHapticVibrationAction
// purpose :
// =======================================================================
void Aspect_XRSession::AbortHapticVibrationAction(const Handle(Aspect_XRAction)& theAction) void Aspect_XRSession::AbortHapticVibrationAction(const Handle(Aspect_XRAction)& theAction)
{ {
triggerHapticVibrationAction(theAction, Aspect_XRHapticActionData()); triggerHapticVibrationAction(theAction, Aspect_XRHapticActionData());
} }
// ======================================================================= //=================================================================================================
// function : TriggerHapticVibrationAction
// purpose :
// =======================================================================
void Aspect_XRSession::TriggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction, void Aspect_XRSession::TriggerHapticVibrationAction(const Handle(Aspect_XRAction)& theAction,
const Aspect_XRHapticActionData& theParams) const Aspect_XRHapticActionData& theParams)
{ {

View File

@ -41,10 +41,8 @@
#include <TopTools_MapOfShape.hxx> #include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx> #include <TopTools_SequenceOfShape.hxx>
// ================================================================================ //=================================================================================================
// function: Constructor
// purpose:
// ================================================================================
BOPAlgo_ArgumentAnalyzer::BOPAlgo_ArgumentAnalyzer() BOPAlgo_ArgumentAnalyzer::BOPAlgo_ArgumentAnalyzer()
: BOPAlgo_Algo(), : BOPAlgo_Algo(),
myStopOnFirst(Standard_False), myStopOnFirst(Standard_False),
@ -70,64 +68,50 @@ BOPAlgo_ArgumentAnalyzer::~BOPAlgo_ArgumentAnalyzer()
myResult.Clear(); myResult.Clear();
} }
// ================================================================================ //=================================================================================================
// function: SetShape1
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::SetShape1(const TopoDS_Shape& TheShape) void BOPAlgo_ArgumentAnalyzer::SetShape1(const TopoDS_Shape& TheShape)
{ {
myShape1 = TheShape; myShape1 = TheShape;
} }
// ================================================================================ //=================================================================================================
// function: SetShape2
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::SetShape2(const TopoDS_Shape& TheShape) void BOPAlgo_ArgumentAnalyzer::SetShape2(const TopoDS_Shape& TheShape)
{ {
myShape2 = TheShape; myShape2 = TheShape;
} }
// ================================================================================ //=================================================================================================
// function: GetShape1
// purpose:
// ================================================================================
const TopoDS_Shape& BOPAlgo_ArgumentAnalyzer::GetShape1() const const TopoDS_Shape& BOPAlgo_ArgumentAnalyzer::GetShape1() const
{ {
return myShape1; return myShape1;
} }
// ================================================================================ //=================================================================================================
// function: GetShape2
// purpose:
// ================================================================================
const TopoDS_Shape& BOPAlgo_ArgumentAnalyzer::GetShape2() const const TopoDS_Shape& BOPAlgo_ArgumentAnalyzer::GetShape2() const
{ {
return myShape2; return myShape2;
} }
// ================================================================================ //=================================================================================================
// function: OperationType
// purpose:
// ================================================================================
BOPAlgo_Operation& BOPAlgo_ArgumentAnalyzer::OperationType() BOPAlgo_Operation& BOPAlgo_ArgumentAnalyzer::OperationType()
{ {
return myOperation; return myOperation;
} }
// ================================================================================ //=================================================================================================
// function: StopOnFirstFaulty
// purpose:
// ================================================================================
Standard_Boolean& BOPAlgo_ArgumentAnalyzer::StopOnFirstFaulty() Standard_Boolean& BOPAlgo_ArgumentAnalyzer::StopOnFirstFaulty()
{ {
return myStopOnFirst; return myStopOnFirst;
} }
// ================================================================================ //=================================================================================================
// function: Prepare
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::Prepare() void BOPAlgo_ArgumentAnalyzer::Prepare()
{ {
Standard_Boolean isS1 = myShape1.IsNull(), isS2 = myShape2.IsNull(); Standard_Boolean isS1 = myShape1.IsNull(), isS2 = myShape2.IsNull();
@ -141,10 +125,8 @@ void BOPAlgo_ArgumentAnalyzer::Prepare()
} }
} }
// ================================================================================ //=================================================================================================
// function: Perform
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::Perform(const Message_ProgressRange& theRange) void BOPAlgo_ArgumentAnalyzer::Perform(const Message_ProgressRange& theRange)
{ {
Message_ProgressScope aPS(theRange, "Analyze shapes", 10); Message_ProgressScope aPS(theRange, "Analyze shapes", 10);
@ -262,28 +244,22 @@ void BOPAlgo_ArgumentAnalyzer::Perform(const Message_ProgressRange& theRange)
} }
} }
// ================================================================================ //=================================================================================================
// function: HasFaulty
// purpose:
// ================================================================================
Standard_Boolean BOPAlgo_ArgumentAnalyzer::HasFaulty() const Standard_Boolean BOPAlgo_ArgumentAnalyzer::HasFaulty() const
{ {
return (!myResult.IsEmpty()); return (!myResult.IsEmpty());
} }
// ================================================================================ //=================================================================================================
// function: GetCheckResult
// purpose:
// ================================================================================
const BOPAlgo_ListOfCheckResult& BOPAlgo_ArgumentAnalyzer::GetCheckResult() const const BOPAlgo_ListOfCheckResult& BOPAlgo_ArgumentAnalyzer::GetCheckResult() const
{ {
return myResult; return myResult;
} }
// ================================================================================ //=================================================================================================
// function: TestTypes
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestTypes() void BOPAlgo_ArgumentAnalyzer::TestTypes()
{ {
Standard_Boolean isS1 = myShape1.IsNull(), isS2 = myShape2.IsNull(); Standard_Boolean isS1 = myShape1.IsNull(), isS2 = myShape2.IsNull();
@ -448,10 +424,8 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences(const Message_ProgressRange
} // for(ii = 0; ii < 2; ii++) { } // for(ii = 0; ii < 2; ii++) {
} }
// ================================================================================ //=================================================================================================
// function: TestSmallEdge
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestSmallEdge() void BOPAlgo_ArgumentAnalyzer::TestSmallEdge()
{ {
Standard_Integer i = 0; Standard_Integer i = 0;
@ -570,10 +544,8 @@ void BOPAlgo_ArgumentAnalyzer::TestSmallEdge()
} }
} }
// ================================================================================ //=================================================================================================
// function: TestRebuildFace
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestRebuildFace() void BOPAlgo_ArgumentAnalyzer::TestRebuildFace()
{ {
if ((myOperation == BOPAlgo_SECTION) || (myOperation == BOPAlgo_UNKNOWN)) if ((myOperation == BOPAlgo_SECTION) || (myOperation == BOPAlgo_UNKNOWN))
@ -671,19 +643,15 @@ void BOPAlgo_ArgumentAnalyzer::TestRebuildFace()
} }
} }
// ================================================================================ //=================================================================================================
// function: TestTangent
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestTangent() void BOPAlgo_ArgumentAnalyzer::TestTangent()
{ {
// not implemented // not implemented
} }
// ================================================================================ //=================================================================================================
// function: TestMergeSubShapes
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestMergeSubShapes(const TopAbs_ShapeEnum theType) void BOPAlgo_ArgumentAnalyzer::TestMergeSubShapes(const TopAbs_ShapeEnum theType)
{ {
if (myShape1.IsNull() || myShape2.IsNull()) if (myShape1.IsNull() || myShape2.IsNull())
@ -869,28 +837,22 @@ void BOPAlgo_ArgumentAnalyzer::TestMergeSubShapes(const TopAbs_ShapeEnum theType
} }
} }
// ================================================================================ //=================================================================================================
// function: TestMergeVertex
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestMergeVertex() void BOPAlgo_ArgumentAnalyzer::TestMergeVertex()
{ {
TestMergeSubShapes(TopAbs_VERTEX); TestMergeSubShapes(TopAbs_VERTEX);
} }
// ================================================================================ //=================================================================================================
// function: TestMergeEdge
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestMergeEdge() void BOPAlgo_ArgumentAnalyzer::TestMergeEdge()
{ {
TestMergeSubShapes(TopAbs_EDGE); TestMergeSubShapes(TopAbs_EDGE);
} }
// ================================================================================ //=================================================================================================
// function: TestContinuity
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestContinuity() void BOPAlgo_ArgumentAnalyzer::TestContinuity()
{ {
Standard_Integer i, j, aNbS; Standard_Integer i, j, aNbS;
@ -955,10 +917,8 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity()
} }
} }
// ================================================================================ //=================================================================================================
// function: TestCurveOnSurface
// purpose:
// ================================================================================
void BOPAlgo_ArgumentAnalyzer::TestCurveOnSurface() void BOPAlgo_ArgumentAnalyzer::TestCurveOnSurface()
{ {
Standard_Integer i; Standard_Integer i;

View File

@ -164,10 +164,8 @@ public:
} }
}; };
// ======================================================================= //=================================================================================================
// function : sign
// purpose :
// =======================================================================
Standard_Real sign(const BVH_Vec3d& theVertex0, Standard_Real sign(const BVH_Vec3d& theVertex0,
const BVH_Vec3d& theVertex1, const BVH_Vec3d& theVertex1,
const BVH_Vec3d& theVertex2, const BVH_Vec3d& theVertex2,
@ -178,10 +176,8 @@ Standard_Real sign(const BVH_Vec3d& theVertex0,
- (theVertex1[theX] - theVertex2[theX]) * (theVertex0[theY] - theVertex2[theY]); - (theVertex1[theX] - theVertex2[theX]) * (theVertex0[theY] - theVertex2[theY]);
} }
// ======================================================================= //=================================================================================================
// function : pointInTriangle
// purpose :
// =======================================================================
Standard_Boolean pointInTriangle(const BVH_Vec3d& theTestPnt, Standard_Boolean pointInTriangle(const BVH_Vec3d& theTestPnt,
const BVH_Vec3d& theTrgVtx0, const BVH_Vec3d& theTrgVtx0,
const BVH_Vec3d& theTrgVtx1, const BVH_Vec3d& theTrgVtx1,

View File

@ -99,10 +99,8 @@ Standard_Boolean rayInsideAngle(const BVH_Vec3d& theDirec,
&& ccw(ZERO_VEC, theDirec, theEdge1, theX, theY) == aCCW; && ccw(ZERO_VEC, theDirec, theEdge1, theX, theY) == aCCW;
} }
// ======================================================================= //=================================================================================================
// function : getProjectionAxes
// purpose :
// =======================================================================
void getProjectionAxes(const BVH_Vec3d& theNorm, void getProjectionAxes(const BVH_Vec3d& theNorm,
Standard_Integer& theAxisX, Standard_Integer& theAxisX,
Standard_Integer& theAxisY) Standard_Integer& theAxisY)

View File

@ -189,10 +189,8 @@ static void UpdateSectionEdge(TopoDS_Edge& theEdge,
TopoDS_Vertex& theVertex, TopoDS_Vertex& theVertex,
const Standard_Real theParam); const Standard_Real theParam);
// =========================================================================================== //=================================================================================================
// function: Constructor
// purpose:
// ===========================================================================================
BRepFill_TrimShellCorner::BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces, BRepFill_TrimShellCorner::BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces,
const BRepFill_TransitionStyle theTransition, const BRepFill_TransitionStyle theTransition,
const gp_Ax2& theAxeOfBisPlane, const gp_Ax2& theAxeOfBisPlane,
@ -210,10 +208,8 @@ BRepFill_TrimShellCorner::BRepFill_TrimShellCorner(const Handle(TopTools_HArray2
myFaces->ChangeArray2() = theFaces->Array2(); myFaces->ChangeArray2() = theFaces->Array2();
} }
// =========================================================================================== //=================================================================================================
// function: AddBounds
// purpose:
// ===========================================================================================
void BRepFill_TrimShellCorner::AddBounds(const Handle(TopTools_HArray2OfShape)& theBounds) void BRepFill_TrimShellCorner::AddBounds(const Handle(TopTools_HArray2OfShape)& theBounds)
{ {
myBounds = new TopTools_HArray2OfShape(theBounds->LowerRow(), myBounds = new TopTools_HArray2OfShape(theBounds->LowerRow(),
@ -223,10 +219,8 @@ void BRepFill_TrimShellCorner::AddBounds(const Handle(TopTools_HArray2OfShape)&
myBounds->ChangeArray2() = theBounds->Array2(); myBounds->ChangeArray2() = theBounds->Array2();
} }
// =========================================================================================== //=================================================================================================
// function: AddUEdges
// purpose:
// ===========================================================================================
void BRepFill_TrimShellCorner::AddUEdges(const Handle(TopTools_HArray2OfShape)& theUEdges) void BRepFill_TrimShellCorner::AddUEdges(const Handle(TopTools_HArray2OfShape)& theUEdges)
{ {
myUEdges = new TopTools_HArray2OfShape(theUEdges->LowerRow(), myUEdges = new TopTools_HArray2OfShape(theUEdges->LowerRow(),
@ -236,10 +230,8 @@ void BRepFill_TrimShellCorner::AddUEdges(const Handle(TopTools_HArray2OfShape)&
myUEdges->ChangeArray2() = theUEdges->Array2(); myUEdges->ChangeArray2() = theUEdges->Array2();
} }
// =========================================================================================== //=================================================================================================
// function: AddVEdges
// purpose:
// ===========================================================================================
void BRepFill_TrimShellCorner::AddVEdges(const Handle(TopTools_HArray2OfShape)& theVEdges, void BRepFill_TrimShellCorner::AddVEdges(const Handle(TopTools_HArray2OfShape)& theVEdges,
const Standard_Integer theIndex) const Standard_Integer theIndex)
{ {
@ -249,10 +241,8 @@ void BRepFill_TrimShellCorner::AddVEdges(const Handle(TopTools_HArray2OfShape)&
myVEdges->SetValue(i, theVEdges->Value(i, theIndex)); myVEdges->SetValue(i, theVEdges->Value(i, theIndex));
} }
// =========================================================================================== //=================================================================================================
// function: Perform
// purpose:
// ===========================================================================================
void BRepFill_TrimShellCorner::Perform() void BRepFill_TrimShellCorner::Perform()
{ {
Standard_Integer anIndex1, anIndex2, nF1, nF2, i, j, aNbP, aNbC; Standard_Integer anIndex1, anIndex2, nF1, nF2, i, j, aNbP, aNbC;
@ -395,28 +385,22 @@ void BRepFill_TrimShellCorner::Perform()
myDone = Standard_True; myDone = Standard_True;
} }
// =========================================================================================== //=================================================================================================
// function: IsDone
// purpose:
// ===========================================================================================
Standard_Boolean BRepFill_TrimShellCorner::IsDone() const Standard_Boolean BRepFill_TrimShellCorner::IsDone() const
{ {
return myDone; return myDone;
} }
// =========================================================================================== //=================================================================================================
// function: HasSection
// purpose:
// ===========================================================================================
Standard_Boolean BRepFill_TrimShellCorner::HasSection() const Standard_Boolean BRepFill_TrimShellCorner::HasSection() const
{ {
return myHasSection; return myHasSection;
} }
// =========================================================================================== //=================================================================================================
// function: Modified
// purpose:
// ===========================================================================================
void BRepFill_TrimShellCorner::Modified(const TopoDS_Shape& theShape, void BRepFill_TrimShellCorner::Modified(const TopoDS_Shape& theShape,
TopTools_ListOfShape& theModified) TopTools_ListOfShape& theModified)
{ {

View File

@ -30,10 +30,8 @@
#include <random> #include <random>
// ======================================================================= //=================================================================================================
// function : BRepLib_PointCloudShape
// purpose :
// =======================================================================
BRepLib_PointCloudShape::BRepLib_PointCloudShape(const TopoDS_Shape& theShape, BRepLib_PointCloudShape::BRepLib_PointCloudShape(const TopoDS_Shape& theShape,
const Standard_Real theTol) const Standard_Real theTol)
: myShape(theShape), : myShape(theShape),
@ -44,19 +42,15 @@ BRepLib_PointCloudShape::BRepLib_PointCloudShape(const TopoDS_Shape& theShape,
// //
} }
// ======================================================================= //=================================================================================================
// function : ~BRepLib_PointCloudShape
// purpose :
// =======================================================================
BRepLib_PointCloudShape::~BRepLib_PointCloudShape() BRepLib_PointCloudShape::~BRepLib_PointCloudShape()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : NbPointsByDensity
// purpose :
// =======================================================================
Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity(const Standard_Real theDensity) Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity(const Standard_Real theDensity)
{ {
clear(); clear();
@ -78,10 +72,8 @@ Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity(const Standard_Real
return aNbPoints; return aNbPoints;
} }
// ======================================================================= //=================================================================================================
// function : GeneratePointsByDensity
// purpose :
// =======================================================================
Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity(const Standard_Real theDensity) Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity(const Standard_Real theDensity)
{ {
if (myFacePoints.IsEmpty()) if (myFacePoints.IsEmpty())
@ -103,10 +95,8 @@ Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity(const Standard
return (aNbAdded > 0); return (aNbAdded > 0);
} }
// ======================================================================= //=================================================================================================
// function : GeneratePointsByTriangulation
// purpose :
// =======================================================================
Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation() Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation()
{ {
clear(); clear();
@ -122,10 +112,8 @@ Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation()
return (aNbAdded > 0); return (aNbAdded > 0);
} }
// ======================================================================= //=================================================================================================
// function : faceArea
// purpose :
// =======================================================================
Standard_Real BRepLib_PointCloudShape::faceArea(const TopoDS_Shape& theShape) Standard_Real BRepLib_PointCloudShape::faceArea(const TopoDS_Shape& theShape)
{ {
Standard_Real anArea = 0.0; Standard_Real anArea = 0.0;
@ -141,10 +129,8 @@ Standard_Real BRepLib_PointCloudShape::faceArea(const TopoDS_Shape& theShape)
return anArea; return anArea;
} }
// ======================================================================= //=================================================================================================
// function : computeDensity
// purpose :
// =======================================================================
Standard_Real BRepLib_PointCloudShape::computeDensity() Standard_Real BRepLib_PointCloudShape::computeDensity()
{ {
// at first step find the face with smallest area // at first step find the face with smallest area
@ -165,10 +151,8 @@ Standard_Real BRepLib_PointCloudShape::computeDensity()
return anAreaMin * 0.1; return anAreaMin * 0.1;
} }
// ======================================================================= //=================================================================================================
// function : NbPointsByTriangulation
// purpose :
// =======================================================================
Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation() const Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation() const
{ {
// at first step find the face with smallest area // at first step find the face with smallest area
@ -188,10 +172,8 @@ Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation() const
return aNbPoints; return aNbPoints;
} }
// ======================================================================= //=================================================================================================
// function : addDensityPoints
// purpose :
// =======================================================================
Standard_Boolean BRepLib_PointCloudShape::addDensityPoints(const TopoDS_Shape& theFace) Standard_Boolean BRepLib_PointCloudShape::addDensityPoints(const TopoDS_Shape& theFace)
{ {
// addition of the points with specified density on the face by random way // addition of the points with specified density on the face by random way
@ -261,10 +243,8 @@ Standard_Boolean BRepLib_PointCloudShape::addDensityPoints(const TopoDS_Shape& t
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : addTriangulationPoints
// purpose :
// =======================================================================
Standard_Boolean BRepLib_PointCloudShape::addTriangulationPoints(const TopoDS_Shape& theFace) Standard_Boolean BRepLib_PointCloudShape::addTriangulationPoints(const TopoDS_Shape& theFace)
{ {
TopLoc_Location aLoc; TopLoc_Location aLoc;
@ -297,10 +277,8 @@ Standard_Boolean BRepLib_PointCloudShape::addTriangulationPoints(const TopoDS_Sh
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : clear
// purpose :
// =======================================================================
void BRepLib_PointCloudShape::clear() void BRepLib_PointCloudShape::clear()
{ {
myFaceArea.Clear(); myFaceArea.Clear();

View File

@ -22,10 +22,8 @@
#include <TopoDS.hxx> #include <TopoDS.hxx>
#include <TopoDS_Face.hxx> #include <TopoDS_Face.hxx>
// ======================================================================= //=================================================================================================
// function : ComputeNormals
// purpose :
// =======================================================================
void BRepLib_ToolTriangulatedShape::ComputeNormals(const TopoDS_Face& theFace, void BRepLib_ToolTriangulatedShape::ComputeNormals(const TopoDS_Face& theFace,
const Handle(Poly_Triangulation)& theTris, const Handle(Poly_Triangulation)& theTris,
Poly_Connect& thePolyConnect) Poly_Connect& thePolyConnect)

View File

@ -2501,10 +2501,8 @@ Standard_Real BRepMesh_Delaun::polyArea(const IMeshData::SequenceOfInteger& theP
} }
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
//======================================================================= //=================================================================================================
// function : BRepMesh_DumpPoly
// purpose :
//=======================================================================
#include <TopoDS_Compound.hxx> #include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
#include <Standard_ErrorHandler.hxx> #include <Standard_ErrorHandler.hxx>

View File

@ -17,10 +17,8 @@
IMPLEMENT_STANDARD_RTTIEXT(BVH_Properties, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(BVH_Properties, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : ~BVH_Properties
// purpose :
// =======================================================================
BVH_Properties::~BVH_Properties() BVH_Properties::~BVH_Properties()
{ {
// //

View File

@ -814,10 +814,8 @@ void Bnd_OBB::ReBuild(const TColgp_Array1OfPnt& theListOfPoints,
aTool.BuildBox(*this); aTool.BuildBox(*this);
} }
// ======================================================================= //=================================================================================================
// function : IsOut
// purpose :
// =======================================================================
Standard_Boolean Bnd_OBB::IsOut(const Bnd_OBB& theOther) const Standard_Boolean Bnd_OBB::IsOut(const Bnd_OBB& theOther) const
{ {
if (IsVoid() || theOther.IsVoid()) if (IsVoid() || theOther.IsVoid())
@ -919,10 +917,8 @@ Standard_Boolean Bnd_OBB::IsOut(const Bnd_OBB& theOther) const
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : IsOut
// purpose :
// =======================================================================
Standard_Boolean Bnd_OBB::IsOut(const gp_Pnt& theP) const Standard_Boolean Bnd_OBB::IsOut(const gp_Pnt& theP) const
{ {
// 1. Project the point to myAxes[i] (i=0...2). // 1. Project the point to myAxes[i] (i=0...2).
@ -956,10 +952,8 @@ Standard_Boolean Bnd_OBB::IsCompletelyInside(const Bnd_OBB& theOther) const
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : Add
// purpose :
// =======================================================================
void Bnd_OBB::Add(const gp_Pnt& theP) void Bnd_OBB::Add(const gp_Pnt& theP)
{ {
if (IsVoid()) if (IsVoid())
@ -982,10 +976,8 @@ void Bnd_OBB::Add(const gp_Pnt& theP)
} }
} }
// ======================================================================= //=================================================================================================
// function : Add
// purpose :
// =======================================================================
void Bnd_OBB::Add(const Bnd_OBB& theOther) void Bnd_OBB::Add(const Bnd_OBB& theOther)
{ {
if (!theOther.IsVoid()) if (!theOther.IsVoid())

View File

@ -166,10 +166,8 @@ void Bnd_Range::Split(const Standard_Real theVal,
} }
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Bnd_Range::DumpJson(Standard_OStream& theOStream, Standard_Integer) const void Bnd_Range::DumpJson(Standard_OStream& theOStream, Standard_Integer) const
{ {
OCCT_DUMP_CLASS_BEGIN(theOStream, Bnd_Range) OCCT_DUMP_CLASS_BEGIN(theOStream, Bnd_Range)

View File

@ -25,10 +25,8 @@
IMPLEMENT_STANDARD_RTTIEXT(D3DHost_FrameBuffer, OpenGl_FrameBuffer) IMPLEMENT_STANDARD_RTTIEXT(D3DHost_FrameBuffer, OpenGl_FrameBuffer)
// ======================================================================= //=================================================================================================
// function : D3DHost_FrameBuffer
// purpose :
// =======================================================================
D3DHost_FrameBuffer::D3DHost_FrameBuffer() D3DHost_FrameBuffer::D3DHost_FrameBuffer()
: myD3dSurf(NULL), : myD3dSurf(NULL),
myD3dSurfShare(NULL), myD3dSurfShare(NULL),
@ -41,19 +39,15 @@ D3DHost_FrameBuffer::D3DHost_FrameBuffer()
// //
} }
// ======================================================================= //=================================================================================================
// function : ~D3DHost_FrameBuffer
// purpose :
// =======================================================================
D3DHost_FrameBuffer::~D3DHost_FrameBuffer() D3DHost_FrameBuffer::~D3DHost_FrameBuffer()
{ {
Release(NULL); Release(NULL);
} }
// ======================================================================= //=================================================================================================
// function : Release
// purpose :
// =======================================================================
void D3DHost_FrameBuffer::Release(OpenGl_Context* theCtx) void D3DHost_FrameBuffer::Release(OpenGl_Context* theCtx)
{ {
if (myGlD3dDevice != NULL) if (myGlD3dDevice != NULL)
@ -86,10 +80,8 @@ void D3DHost_FrameBuffer::Release(OpenGl_Context* theCtx)
OpenGl_FrameBuffer::Release(theCtx); OpenGl_FrameBuffer::Release(theCtx);
} }
// ======================================================================= //=================================================================================================
// function : Init
// purpose :
// =======================================================================
Standard_Boolean D3DHost_FrameBuffer::Init(const Handle(OpenGl_Context)& theCtx, Standard_Boolean D3DHost_FrameBuffer::Init(const Handle(OpenGl_Context)& theCtx,
IDirect3DDevice9* theD3DDevice, IDirect3DDevice9* theD3DDevice,
const Standard_Boolean theIsD3dEx, const Standard_Boolean theIsD3dEx,
@ -103,10 +95,8 @@ Standard_Boolean D3DHost_FrameBuffer::Init(const Handle(OpenGl_Context)& theCtx,
return InitD3dFallback(theCtx, theD3DDevice, theIsD3dEx, theSizeX, theSizeY, GL_DEPTH24_STENCIL8); return InitD3dFallback(theCtx, theD3DDevice, theIsD3dEx, theSizeX, theSizeY, GL_DEPTH24_STENCIL8);
} }
// ======================================================================= //=================================================================================================
// function : InitD3dFallback
// purpose :
// =======================================================================
Standard_Boolean D3DHost_FrameBuffer::InitD3dFallback(const Handle(OpenGl_Context)& theCtx, Standard_Boolean D3DHost_FrameBuffer::InitD3dFallback(const Handle(OpenGl_Context)& theCtx,
IDirect3DDevice9* theD3DDevice, IDirect3DDevice9* theD3DDevice,
const Standard_Boolean theIsD3dEx, const Standard_Boolean theIsD3dEx,
@ -146,10 +136,8 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dFallback(const Handle(OpenGl_Contex
return isGlInit; return isGlInit;
} }
// ======================================================================= //=================================================================================================
// function : InitD3dInterop
// purpose :
// =======================================================================
Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop(const Handle(OpenGl_Context)& theCtx, Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop(const Handle(OpenGl_Context)& theCtx,
IDirect3DDevice9* theD3DDevice, IDirect3DDevice9* theD3DDevice,
const Standard_Boolean theIsD3dEx, const Standard_Boolean theIsD3dEx,
@ -248,10 +236,8 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop(const Handle(OpenGl_Context
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : registerD3dBuffer
// purpose :
// =======================================================================
Standard_Boolean D3DHost_FrameBuffer::registerD3dBuffer(const Handle(OpenGl_Context)& theCtx) Standard_Boolean D3DHost_FrameBuffer::registerD3dBuffer(const Handle(OpenGl_Context)& theCtx)
{ {
const OpenGl_GlFunctions* aFuncs = theCtx->Functions(); const OpenGl_GlFunctions* aFuncs = theCtx->Functions();
@ -302,10 +288,8 @@ Standard_Boolean D3DHost_FrameBuffer::registerD3dBuffer(const Handle(OpenGl_Cont
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : BindBuffer
// purpose :
// =======================================================================
void D3DHost_FrameBuffer::BindBuffer(const Handle(OpenGl_Context)& theCtx) void D3DHost_FrameBuffer::BindBuffer(const Handle(OpenGl_Context)& theCtx)
{ {
Standard_ProgramError_Raise_if( Standard_ProgramError_Raise_if(
@ -376,10 +360,8 @@ void D3DHost_FrameBuffer::BindBuffer(const Handle(OpenGl_Context)& theCtx)
} }
} }
// ======================================================================= //=================================================================================================
// function : LockSurface
// purpose :
// =======================================================================
void D3DHost_FrameBuffer::LockSurface(const Handle(OpenGl_Context)& theCtx) void D3DHost_FrameBuffer::LockSurface(const Handle(OpenGl_Context)& theCtx)
{ {
if (++myLockCount > 1) if (++myLockCount > 1)
@ -402,10 +384,8 @@ void D3DHost_FrameBuffer::LockSurface(const Handle(OpenGl_Context)& theCtx)
} }
} }
// ======================================================================= //=================================================================================================
// function : UnlockSurface
// purpose :
// =======================================================================
void D3DHost_FrameBuffer::UnlockSurface(const Handle(OpenGl_Context)& theCtx) void D3DHost_FrameBuffer::UnlockSurface(const Handle(OpenGl_Context)& theCtx)
{ {
if (--myLockCount != 0) if (--myLockCount != 0)

View File

@ -24,29 +24,23 @@ IMPLEMENT_STANDARD_RTTIEXT(D3DHost_GraphicDriver, OpenGl_GraphicDriver)
#pragma comment(lib, "D3D9.lib") #pragma comment(lib, "D3D9.lib")
#endif #endif
// ======================================================================= //=================================================================================================
// function : D3DHost_GraphicDriver
// purpose :
// =======================================================================
D3DHost_GraphicDriver::D3DHost_GraphicDriver() D3DHost_GraphicDriver::D3DHost_GraphicDriver()
: OpenGl_GraphicDriver(Handle(Aspect_DisplayConnection)(), Standard_True) : OpenGl_GraphicDriver(Handle(Aspect_DisplayConnection)(), Standard_True)
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : ~D3DHost_GraphicDriver
// purpose :
// =======================================================================
D3DHost_GraphicDriver::~D3DHost_GraphicDriver() D3DHost_GraphicDriver::~D3DHost_GraphicDriver()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : CreateView
// purpose :
// =======================================================================
Handle(Graphic3d_CView) D3DHost_GraphicDriver::CreateView( Handle(Graphic3d_CView) D3DHost_GraphicDriver::CreateView(
const Handle(Graphic3d_StructureManager)& theMgr) const Handle(Graphic3d_StructureManager)& theMgr)
{ {

View File

@ -17,19 +17,15 @@
IMPLEMENT_STANDARD_RTTIEXT(D3DHost_GraphicDriverFactory, OpenGl_GraphicDriverFactory) IMPLEMENT_STANDARD_RTTIEXT(D3DHost_GraphicDriverFactory, OpenGl_GraphicDriverFactory)
// ======================================================================= //=================================================================================================
// function : D3DHost_GraphicDriverFactory
// purpose :
// =======================================================================
D3DHost_GraphicDriverFactory::D3DHost_GraphicDriverFactory() D3DHost_GraphicDriverFactory::D3DHost_GraphicDriverFactory()
{ {
myName = "TKD3DHost"; myName = "TKD3DHost";
} }
// ======================================================================= //=================================================================================================
// function : CreateDriver
// purpose :
// =======================================================================
Handle(Graphic3d_GraphicDriver) D3DHost_GraphicDriverFactory::CreateDriver( Handle(Graphic3d_GraphicDriver) D3DHost_GraphicDriverFactory::CreateDriver(
const Handle(Aspect_DisplayConnection)&) const Handle(Aspect_DisplayConnection)&)
{ {

View File

@ -35,10 +35,8 @@ enum D3DHost_VendorId
}; };
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : d3dFormatError
// purpose :
// =======================================================================
TCollection_AsciiString D3DHost_View::d3dFormatError(const long theErrCode) TCollection_AsciiString D3DHost_View::d3dFormatError(const long theErrCode)
{ {
switch (theErrCode) switch (theErrCode)
@ -60,10 +58,8 @@ TCollection_AsciiString D3DHost_View::d3dFormatError(const long theErrCode)
} }
} }
// ======================================================================= //=================================================================================================
// function : D3DHost_View
// purpose :
// =======================================================================
D3DHost_View::D3DHost_View(const Handle(Graphic3d_StructureManager)& theMgr, D3DHost_View::D3DHost_View(const Handle(Graphic3d_StructureManager)& theMgr,
const Handle(D3DHost_GraphicDriver)& theDriver, const Handle(D3DHost_GraphicDriver)& theDriver,
const Handle(OpenGl_Caps)& theCaps, const Handle(OpenGl_Caps)& theCaps,
@ -89,10 +85,8 @@ D3DHost_View::D3DHost_View(const Handle(Graphic3d_StructureManager)& theMgr,
myD3dParams->PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; myD3dParams->PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
} }
// ======================================================================= //=================================================================================================
// function : ~D3DHost_View
// purpose :
// =======================================================================
D3DHost_View::~D3DHost_View() D3DHost_View::~D3DHost_View()
{ {
ReleaseGlResources(NULL); ReleaseGlResources(NULL);
@ -108,10 +102,8 @@ D3DHost_View::~D3DHost_View()
} }
} }
// ======================================================================= //=================================================================================================
// function : ReleaseGlResources
// purpose :
// =======================================================================
void D3DHost_View::ReleaseGlResources(const Handle(OpenGl_Context)& theCtx) void D3DHost_View::ReleaseGlResources(const Handle(OpenGl_Context)& theCtx)
{ {
if (!myD3dWglFbo.IsNull()) if (!myD3dWglFbo.IsNull())
@ -122,19 +114,15 @@ void D3DHost_View::ReleaseGlResources(const Handle(OpenGl_Context)& theCtx)
OpenGl_View::ReleaseGlResources(theCtx); OpenGl_View::ReleaseGlResources(theCtx);
} }
// ======================================================================= //=================================================================================================
// function : D3dColorSurface
// purpose :
// =======================================================================
IDirect3DSurface9* D3DHost_View::D3dColorSurface() const IDirect3DSurface9* D3DHost_View::D3dColorSurface() const
{ {
return myD3dWglFbo->D3dColorSurface(); return myD3dWglFbo->D3dColorSurface();
} }
// ======================================================================= //=================================================================================================
// function : SetWindow
// purpose :
// =======================================================================
void D3DHost_View::SetWindow(const Handle(Graphic3d_CView)& theParentVIew, void D3DHost_View::SetWindow(const Handle(Graphic3d_CView)& theParentVIew,
const Handle(Aspect_Window)& theWindow, const Handle(Aspect_Window)& theWindow,
const Aspect_RenderingContext theContext) const Aspect_RenderingContext theContext)
@ -159,10 +147,8 @@ void D3DHost_View::SetWindow(const Handle(Graphic3d_CView)& theParentVIew,
} }
} }
// ======================================================================= //=================================================================================================
// function : DiagnosticInformation
// purpose :
// =======================================================================
void D3DHost_View::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& theDict, void D3DHost_View::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& theDict,
Graphic3d_DiagnosticInfo theFlags) const Graphic3d_DiagnosticInfo theFlags) const
{ {
@ -210,10 +196,8 @@ void D3DHost_View::DiagnosticInformation(TColStd_IndexedDataMapOfStringString& t
: "WGL_NV_DX_interop"); : "WGL_NV_DX_interop");
} }
// ======================================================================= //=================================================================================================
// function : d3dInitLib
// purpose :
// =======================================================================
bool D3DHost_View::d3dInitLib() bool D3DHost_View::d3dInitLib()
{ {
if (myD3dLib == NULL) if (myD3dLib == NULL)
@ -242,10 +226,8 @@ bool D3DHost_View::d3dInitLib()
return myD3dLib != NULL; return myD3dLib != NULL;
} }
// ======================================================================= //=================================================================================================
// function : d3dInit
// purpose :
// =======================================================================
bool D3DHost_View::d3dInit() bool D3DHost_View::d3dInit()
{ {
if (!d3dInitLib()) if (!d3dInitLib())
@ -289,10 +271,8 @@ bool D3DHost_View::d3dInit()
return myD3dDevice != NULL; return myD3dDevice != NULL;
} }
// ======================================================================= //=================================================================================================
// function : d3dReset
// purpose :
// =======================================================================
bool D3DHost_View::d3dReset() bool D3DHost_View::d3dReset()
{ {
if (myD3dDevice == NULL) if (myD3dDevice == NULL)
@ -310,10 +290,8 @@ bool D3DHost_View::d3dReset()
return isOK == D3D_OK; return isOK == D3D_OK;
} }
// ======================================================================= //=================================================================================================
// function : d3dCreateRenderTarget
// purpose :
// =======================================================================
bool D3DHost_View::d3dCreateRenderTarget() bool D3DHost_View::d3dCreateRenderTarget()
{ {
bool toD3dFallback = false; bool toD3dFallback = false;
@ -355,10 +333,8 @@ bool D3DHost_View::d3dCreateRenderTarget()
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : d3dBeginRender
// purpose :
// =======================================================================
void D3DHost_View::d3dBeginRender() void D3DHost_View::d3dBeginRender()
{ {
if (myD3dDevice == NULL) if (myD3dDevice == NULL)
@ -371,10 +347,8 @@ void D3DHost_View::d3dBeginRender()
myD3dDevice->BeginScene(); myD3dDevice->BeginScene();
} }
// ======================================================================= //=================================================================================================
// function : d3dEndRender
// purpose :
// =======================================================================
void D3DHost_View::d3dEndRender() void D3DHost_View::d3dEndRender()
{ {
if (myD3dDevice != NULL) if (myD3dDevice != NULL)
@ -383,10 +357,8 @@ void D3DHost_View::d3dEndRender()
} }
} }
// ======================================================================= //=================================================================================================
// function : d3dSwap
// purpose :
// =======================================================================
bool D3DHost_View::d3dSwap() bool D3DHost_View::d3dSwap()
{ {
if (myD3dDevice == NULL) if (myD3dDevice == NULL)
@ -407,10 +379,8 @@ bool D3DHost_View::d3dSwap()
return isOK == D3D_OK; return isOK == D3D_OK;
} }
// ======================================================================= //=================================================================================================
// function : Redraw
// purpose :
// =======================================================================
void D3DHost_View::Redraw() void D3DHost_View::Redraw()
{ {
if (!myWorkspace->Activate() || myD3dDevice == NULL) if (!myWorkspace->Activate() || myD3dDevice == NULL)
@ -470,10 +440,8 @@ void D3DHost_View::Redraw()
d3dSwap(); d3dSwap();
} }
// ======================================================================= //=================================================================================================
// function : RedrawImmediate
// purpose :
// =======================================================================
void D3DHost_View::RedrawImmediate() void D3DHost_View::RedrawImmediate()
{ {
Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext(); Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext();
@ -520,10 +488,8 @@ void D3DHost_View::RedrawImmediate()
d3dSwap(); d3dSwap();
} }
// ======================================================================= //=================================================================================================
// function : Resize
// purpose :
// =======================================================================
void D3DHost_View::Resized() void D3DHost_View::Resized()
{ {
const Standard_Integer aWidthOld = myWindow->Width(); const Standard_Integer aWidthOld = myWindow->Width();

View File

@ -16,10 +16,8 @@
#include <Draw_PluginMacro.hxx> #include <Draw_PluginMacro.hxx>
#include <D3DHost_GraphicDriverFactory.hxx> #include <D3DHost_GraphicDriverFactory.hxx>
// ====================================================================== //=================================================================================================
// function : Factory
// purpose :
// ======================================================================
void D3DHostTest::Factory(Draw_Interpretor&) void D3DHostTest::Factory(Draw_Interpretor&)
{ {
static const Handle(D3DHost_GraphicDriverFactory) aFactory = new D3DHost_GraphicDriverFactory(); static const Handle(D3DHost_GraphicDriverFactory) aFactory = new D3DHost_GraphicDriverFactory();

View File

@ -21,10 +21,8 @@
#include <Prs3d_TextAspect.hxx> #include <Prs3d_TextAspect.hxx>
#include <Prs3d_ArrowAspect.hxx> #include <Prs3d_ArrowAspect.hxx>
// ======================================================================= //=================================================================================================
// function : Add
// purpose :
// =======================================================================
void DsgPrs_DatumPrs::Add(const Handle(Prs3d_Presentation)& thePresentation, void DsgPrs_DatumPrs::Add(const Handle(Prs3d_Presentation)& thePresentation,
const gp_Ax2& theDatum, const gp_Ax2& theDatum,
const Handle(Prs3d_Drawer)& theDrawer) const Handle(Prs3d_Drawer)& theDrawer)

View File

@ -129,10 +129,8 @@ Extrema_GenExtCS::Extrema_GenExtCS()
{ {
} }
// ======================================================================= //=================================================================================================
// function : ~Extrema_GenExtCS
// purpose :
// =======================================================================
Extrema_GenExtCS::~Extrema_GenExtCS() Extrema_GenExtCS::~Extrema_GenExtCS()
{ {
// //

View File

@ -215,19 +215,15 @@ Extrema_GenExtPS::Extrema_GenExtPS()
myAlgo = Extrema_ExtAlgo_Grad; myAlgo = Extrema_ExtAlgo_Grad;
} }
// ======================================================================= //=================================================================================================
// function : ~Extrema_GenExtPS
// purpose :
// =======================================================================
Extrema_GenExtPS::~Extrema_GenExtPS() Extrema_GenExtPS::~Extrema_GenExtPS()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : Extrema_GenExtPS
// purpose :
// =======================================================================
Extrema_GenExtPS::Extrema_GenExtPS(const gp_Pnt& P, Extrema_GenExtPS::Extrema_GenExtPS(const gp_Pnt& P,
const Adaptor3d_Surface& S, const Adaptor3d_Surface& S,
const Standard_Integer NbU, const Standard_Integer NbU,

View File

@ -111,10 +111,8 @@ Extrema_GenExtSS::Extrema_GenExtSS()
myInit = Standard_False; myInit = Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : ~Extrema_GenExtSS
// purpose :
// =======================================================================
Extrema_GenExtSS::~Extrema_GenExtSS() Extrema_GenExtSS::~Extrema_GenExtSS()
{ {
// //

View File

@ -30,10 +30,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Font_FTFont, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Font_FTFont, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Font_FTFont
// purpose :
// =======================================================================
Font_FTFont::Font_FTFont(const Handle(Font_FTLibrary)& theFTLib) Font_FTFont::Font_FTFont(const Handle(Font_FTLibrary)& theFTLib)
: myFTLib(theFTLib), : myFTLib(theFTLib),
myFTFace(NULL), myFTFace(NULL),
@ -54,19 +52,15 @@ Font_FTFont::Font_FTFont(const Handle(Font_FTLibrary)& theFTLib)
} }
} }
// ======================================================================= //=================================================================================================
// function : Font_FTFont
// purpose :
// =======================================================================
Font_FTFont::~Font_FTFont() Font_FTFont::~Font_FTFont()
{ {
Release(); Release();
} }
// ======================================================================= //=================================================================================================
// function : Release
// purpose :
// =======================================================================
void Font_FTFont::Release() void Font_FTFont::Release()
{ {
myGlyphImg.Clear(); myGlyphImg.Clear();
@ -83,10 +77,8 @@ void Font_FTFont::Release()
myBuffer.Nullify(); myBuffer.Nullify();
} }
// ======================================================================= //=================================================================================================
// function : Init
// purpose :
// =======================================================================
bool Font_FTFont::Init(const Handle(NCollection_Buffer)& theData, bool Font_FTFont::Init(const Handle(NCollection_Buffer)& theData,
const TCollection_AsciiString& theFileName, const TCollection_AsciiString& theFileName,
const Font_FTFontParams& theParams, const Font_FTFontParams& theParams,
@ -200,10 +192,8 @@ bool Font_FTFont::Init(const Handle(NCollection_Buffer)& theData,
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : FindAndCreate
// purpose :
// =======================================================================
Handle(Font_FTFont) Font_FTFont::FindAndCreate(const TCollection_AsciiString& theFontName, Handle(Font_FTFont) Font_FTFont::FindAndCreate(const TCollection_AsciiString& theFontName,
const Font_FontAspect theFontAspect, const Font_FontAspect theFontAspect,
const Font_FTFontParams& theParams, const Font_FTFontParams& theParams,
@ -257,10 +247,8 @@ Handle(Font_FTFont) Font_FTFont::FindAndCreate(const TCollection_AsciiString& th
return Handle(Font_FTFont)(); return Handle(Font_FTFont)();
} }
// ======================================================================= //=================================================================================================
// function : FindAndInit
// purpose :
// =======================================================================
bool Font_FTFont::FindAndInit(const TCollection_AsciiString& theFontName, bool Font_FTFont::FindAndInit(const TCollection_AsciiString& theFontName,
Font_FontAspect theFontAspect, Font_FontAspect theFontAspect,
const Font_FTFontParams& theParams, const Font_FTFontParams& theParams,
@ -296,10 +284,8 @@ bool Font_FTFont::FindAndInit(const TCollection_AsciiString& theFontName,
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : findAndInitFallback
// purpose :
// =======================================================================
bool Font_FTFont::findAndInitFallback(Font_UnicodeSubset theSubset) bool Font_FTFont::findAndInitFallback(Font_UnicodeSubset theSubset)
{ {
if (!myFallbackFaces[theSubset].IsNull()) if (!myFallbackFaces[theSubset].IsNull())
@ -331,10 +317,8 @@ bool Font_FTFont::findAndInitFallback(Font_UnicodeSubset theSubset)
return myFallbackFaces[theSubset]->IsValid(); return myFallbackFaces[theSubset]->IsValid();
} }
// ======================================================================= //=================================================================================================
// function : HasSymbol
// purpose :
// =======================================================================
bool Font_FTFont::HasSymbol(Standard_Utf32Char theUChar) const bool Font_FTFont::HasSymbol(Standard_Utf32Char theUChar) const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -345,10 +329,8 @@ bool Font_FTFont::HasSymbol(Standard_Utf32Char theUChar) const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : loadGlyph
// purpose :
// =======================================================================
bool Font_FTFont::loadGlyph(const Standard_Utf32Char theUChar) bool Font_FTFont::loadGlyph(const Standard_Utf32Char theUChar)
{ {
if (myUChar == theUChar) if (myUChar == theUChar)
@ -388,10 +370,8 @@ bool Font_FTFont::loadGlyph(const Standard_Utf32Char theUChar)
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : RenderGlyph
// purpose :
// =======================================================================
bool Font_FTFont::RenderGlyph(const Standard_Utf32Char theUChar) bool Font_FTFont::RenderGlyph(const Standard_Utf32Char theUChar)
{ {
myGlyphImg.Clear(); myGlyphImg.Clear();
@ -466,10 +446,8 @@ bool Font_FTFont::RenderGlyph(const Standard_Utf32Char theUChar)
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GlyphMaxSizeX
// purpose :
// =======================================================================
unsigned int Font_FTFont::GlyphMaxSizeX(bool theToIncludeFallback) const unsigned int Font_FTFont::GlyphMaxSizeX(bool theToIncludeFallback) const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -500,10 +478,8 @@ unsigned int Font_FTFont::GlyphMaxSizeX(bool theToIncludeFallback) const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GlyphMaxSizeY
// purpose :
// =======================================================================
unsigned int Font_FTFont::GlyphMaxSizeY(bool theToIncludeFallback) const unsigned int Font_FTFont::GlyphMaxSizeY(bool theToIncludeFallback) const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -534,10 +510,8 @@ unsigned int Font_FTFont::GlyphMaxSizeY(bool theToIncludeFallback) const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : Ascender
// purpose :
// =======================================================================
float Font_FTFont::Ascender() const float Font_FTFont::Ascender() const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -548,10 +522,8 @@ float Font_FTFont::Ascender() const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : Descender
// purpose :
// =======================================================================
float Font_FTFont::Descender() const float Font_FTFont::Descender() const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -562,10 +534,8 @@ float Font_FTFont::Descender() const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : LineSpacing
// purpose :
// =======================================================================
float Font_FTFont::LineSpacing() const float Font_FTFont::LineSpacing() const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -576,30 +546,24 @@ float Font_FTFont::LineSpacing() const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : AdvanceX
// purpose :
// =======================================================================
float Font_FTFont::AdvanceX(Standard_Utf32Char theUChar, Standard_Utf32Char theUCharNext) float Font_FTFont::AdvanceX(Standard_Utf32Char theUChar, Standard_Utf32Char theUCharNext)
{ {
loadGlyph(theUChar); loadGlyph(theUChar);
return AdvanceX(theUCharNext); return AdvanceX(theUCharNext);
} }
// ======================================================================= //=================================================================================================
// function : AdvanceY
// purpose :
// =======================================================================
float Font_FTFont::AdvanceY(Standard_Utf32Char theUChar, Standard_Utf32Char theUCharNext) float Font_FTFont::AdvanceY(Standard_Utf32Char theUChar, Standard_Utf32Char theUCharNext)
{ {
loadGlyph(theUChar); loadGlyph(theUChar);
return AdvanceY(theUCharNext); return AdvanceY(theUCharNext);
} }
// ======================================================================= //=================================================================================================
// function : getKerning
// purpose :
// =======================================================================
bool Font_FTFont::getKerning(FT_Vector& theKern, bool Font_FTFont::getKerning(FT_Vector& theKern,
Standard_Utf32Char theUCharCurr, Standard_Utf32Char theUCharCurr,
Standard_Utf32Char theUCharNext) const Standard_Utf32Char theUCharNext) const
@ -628,10 +592,8 @@ bool Font_FTFont::getKerning(FT_Vector& theKern,
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : AdvanceX
// purpose :
// =======================================================================
float Font_FTFont::AdvanceX(Standard_Utf32Char theUCharNext) const float Font_FTFont::AdvanceX(Standard_Utf32Char theUCharNext) const
{ {
if (myUChar == 0) if (myUChar == 0)
@ -652,10 +614,8 @@ float Font_FTFont::AdvanceX(Standard_Utf32Char theUCharNext) const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : AdvanceY
// purpose :
// =======================================================================
float Font_FTFont::AdvanceY(Standard_Utf32Char theUCharNext) const float Font_FTFont::AdvanceY(Standard_Utf32Char theUCharNext) const
{ {
if (myUChar == 0) if (myUChar == 0)
@ -673,10 +633,8 @@ float Font_FTFont::AdvanceY(Standard_Utf32Char theUCharNext) const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GlyphsNumber
// purpose :
// =======================================================================
Standard_Integer Font_FTFont::GlyphsNumber(bool theToIncludeFallback) const Standard_Integer Font_FTFont::GlyphsNumber(bool theToIncludeFallback) const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -698,10 +656,8 @@ Standard_Integer Font_FTFont::GlyphsNumber(bool theToIncludeFallback) const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GlyphRect
// purpose :
// =======================================================================
void Font_FTFont::GlyphRect(Font_Rect& theRect) const void Font_FTFont::GlyphRect(Font_Rect& theRect) const
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
@ -715,10 +671,8 @@ void Font_FTFont::GlyphRect(Font_Rect& theRect) const
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : BoundingBox
// purpose :
// =======================================================================
Font_Rect Font_FTFont::BoundingBox(const NCollection_String& theString, Font_Rect Font_FTFont::BoundingBox(const NCollection_String& theString,
const Graphic3d_HorizontalTextAlignment theAlignX, const Graphic3d_HorizontalTextAlignment theAlignX,
const Graphic3d_VerticalTextAlignment theAlignY) const Graphic3d_VerticalTextAlignment theAlignY)
@ -735,10 +689,8 @@ Font_Rect Font_FTFont::BoundingBox(const NCollection_String& theSt
return aBndBox; return aBndBox;
} }
// ======================================================================= //=================================================================================================
// function : renderGlyphOutline
// purpose :
// =======================================================================
const FT_Outline* Font_FTFont::renderGlyphOutline(const Standard_Utf32Char theChar) const FT_Outline* Font_FTFont::renderGlyphOutline(const Standard_Utf32Char theChar)
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE

View File

@ -22,10 +22,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Font_FTLibrary, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Font_FTLibrary, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Font_FTLibrary
// purpose :
// =======================================================================
Font_FTLibrary::Font_FTLibrary() Font_FTLibrary::Font_FTLibrary()
: myFTLib(NULL) : myFTLib(NULL)
{ {
@ -37,10 +35,8 @@ Font_FTLibrary::Font_FTLibrary()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : ~Font_FTLibrary
// purpose :
// =======================================================================
Font_FTLibrary::~Font_FTLibrary() Font_FTLibrary::~Font_FTLibrary()
{ {
if (IsValid()) if (IsValid())

View File

@ -281,10 +281,8 @@ static bool checkFont(NCollection_Sequence<Handle(Font_SystemFont)>& theFonts,
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GetInstance
// purpose :
// =======================================================================
Handle(Font_FontMgr) Font_FontMgr::GetInstance() Handle(Font_FontMgr) Font_FontMgr::GetInstance()
{ {
static Handle(Font_FontMgr) _mgr; static Handle(Font_FontMgr) _mgr;
@ -296,20 +294,16 @@ Handle(Font_FontMgr) Font_FontMgr::GetInstance()
return _mgr; return _mgr;
} }
// ======================================================================= //=================================================================================================
// function : ToUseUnicodeSubsetFallback
// purpose :
// =======================================================================
Standard_Boolean& Font_FontMgr::ToUseUnicodeSubsetFallback() Standard_Boolean& Font_FontMgr::ToUseUnicodeSubsetFallback()
{ {
static Standard_Boolean TheToUseUnicodeSubsetFallback = true; static Standard_Boolean TheToUseUnicodeSubsetFallback = true;
return TheToUseUnicodeSubsetFallback; return TheToUseUnicodeSubsetFallback;
} }
// ======================================================================= //=================================================================================================
// function : AddFontAlias
// purpose :
// =======================================================================
bool Font_FontMgr::AddFontAlias(const TCollection_AsciiString& theAliasName, bool Font_FontMgr::AddFontAlias(const TCollection_AsciiString& theAliasName,
const TCollection_AsciiString& theFontName) const TCollection_AsciiString& theFontName)
{ {
@ -335,10 +329,8 @@ bool Font_FontMgr::AddFontAlias(const TCollection_AsciiString& theAliasName,
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : RemoveFontAlias
// purpose :
// =======================================================================
bool Font_FontMgr::RemoveFontAlias(const TCollection_AsciiString& theAliasName, bool Font_FontMgr::RemoveFontAlias(const TCollection_AsciiString& theAliasName,
const TCollection_AsciiString& theFontName) const TCollection_AsciiString& theFontName)
{ {
@ -381,10 +373,8 @@ bool Font_FontMgr::RemoveFontAlias(const TCollection_AsciiString& theAliasName,
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : GetAllAliases
// purpose :
// =======================================================================
void Font_FontMgr::GetAllAliases(TColStd_SequenceOfHAsciiString& theAliases) const void Font_FontMgr::GetAllAliases(TColStd_SequenceOfHAsciiString& theAliases) const
{ {
for (NCollection_DataMap<TCollection_AsciiString, Handle(Font_FontAliasSequence)>::Iterator for (NCollection_DataMap<TCollection_AsciiString, Handle(Font_FontAliasSequence)>::Iterator
@ -396,10 +386,8 @@ void Font_FontMgr::GetAllAliases(TColStd_SequenceOfHAsciiString& theAliases) con
} }
} }
// ======================================================================= //=================================================================================================
// function : GetFontAliases
// purpose :
// =======================================================================
void Font_FontMgr::GetFontAliases(TColStd_SequenceOfHAsciiString& theFontNames, void Font_FontMgr::GetFontAliases(TColStd_SequenceOfHAsciiString& theFontNames,
const TCollection_AsciiString& theAliasName) const const TCollection_AsciiString& theAliasName) const
{ {
@ -417,10 +405,8 @@ void Font_FontMgr::GetFontAliases(TColStd_SequenceOfHAsciiString& theFontNames,
} }
} }
// ======================================================================= //=================================================================================================
// function : addFontAlias
// purpose :
// =======================================================================
void Font_FontMgr::addFontAlias(const TCollection_AsciiString& theAliasName, void Font_FontMgr::addFontAlias(const TCollection_AsciiString& theAliasName,
const Handle(Font_FontAliasSequence)& theAliases, const Handle(Font_FontAliasSequence)& theAliases,
Font_FontAspect theAspect) Font_FontAspect theAspect)
@ -447,10 +433,8 @@ void Font_FontMgr::addFontAlias(const TCollection_AsciiString& theAliasNa
myFontAliases.Bind(anAliasName, anAliases); myFontAliases.Bind(anAliasName, anAliases);
} }
// ======================================================================= //=================================================================================================
// function : Font_FontMgr
// purpose :
// =======================================================================
Font_FontMgr::Font_FontMgr() Font_FontMgr::Font_FontMgr()
: myToTraceAliases(Standard_False) : myToTraceAliases(Standard_False)
{ {
@ -553,10 +537,8 @@ Font_FontMgr::Font_FontMgr()
InitFontDataBase(); InitFontDataBase();
} }
// ======================================================================= //=================================================================================================
// function : CheckFont
// purpose :
// =======================================================================
Standard_Boolean Font_FontMgr::CheckFont(NCollection_Sequence<Handle(Font_SystemFont)>& theFonts, Standard_Boolean Font_FontMgr::CheckFont(NCollection_Sequence<Handle(Font_SystemFont)>& theFonts,
const TCollection_AsciiString& theFontPath) const const TCollection_AsciiString& theFontPath) const
{ {
@ -564,10 +546,8 @@ Standard_Boolean Font_FontMgr::CheckFont(NCollection_Sequence<Handle(Font_System
return checkFont(theFonts, aFtLibrary, theFontPath, 0); return checkFont(theFonts, aFtLibrary, theFontPath, 0);
} }
// ======================================================================= //=================================================================================================
// function : CheckFont
// purpose :
// =======================================================================
Handle(Font_SystemFont) Font_FontMgr::CheckFont(Standard_CString theFontPath) const Handle(Font_SystemFont) Font_FontMgr::CheckFont(Standard_CString theFontPath) const
{ {
Handle(Font_FTLibrary) aFtLibrary = new Font_FTLibrary(); Handle(Font_FTLibrary) aFtLibrary = new Font_FTLibrary();
@ -575,10 +555,8 @@ Handle(Font_SystemFont) Font_FontMgr::CheckFont(Standard_CString theFontPath) co
return checkFont(aFonts, aFtLibrary, theFontPath, 0) ? aFonts.First() : Handle(Font_SystemFont)(); return checkFont(aFonts, aFtLibrary, theFontPath, 0) ? aFonts.First() : Handle(Font_SystemFont)();
} }
// ======================================================================= //=================================================================================================
// function : RegisterFont
// purpose :
// =======================================================================
Standard_Boolean Font_FontMgr::RegisterFont(const Handle(Font_SystemFont)& theFont, Standard_Boolean Font_FontMgr::RegisterFont(const Handle(Font_SystemFont)& theFont,
const Standard_Boolean theToOverride) const Standard_Boolean theToOverride)
{ {
@ -618,19 +596,15 @@ Standard_Boolean Font_FontMgr::RegisterFont(const Handle(Font_SystemFont)& theFo
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : ClearFontDataBase()
// purpose :
// =======================================================================
void Font_FontMgr::ClearFontDataBase() void Font_FontMgr::ClearFontDataBase()
{ {
myFontMap.Clear(); myFontMap.Clear();
} }
// ======================================================================= //=================================================================================================
// function : InitFontDataBase
// purpose :
// =======================================================================
void Font_FontMgr::InitFontDataBase() void Font_FontMgr::InitFontDataBase()
{ {
myFontMap.Clear(); myFontMap.Clear();
@ -941,10 +915,8 @@ void Font_FontMgr::InitFontDataBase()
#endif #endif
} }
// ======================================================================= //=================================================================================================
// function : GetAvailableFontsNames
// purpose :
// =======================================================================
void Font_FontMgr::GetAvailableFontsNames(TColStd_SequenceOfHAsciiString& theFontsNames) const void Font_FontMgr::GetAvailableFontsNames(TColStd_SequenceOfHAsciiString& theFontsNames) const
{ {
theFontsNames.Clear(); theFontsNames.Clear();
@ -955,10 +927,8 @@ void Font_FontMgr::GetAvailableFontsNames(TColStd_SequenceOfHAsciiString& theFon
} }
} }
// ======================================================================= //=================================================================================================
// function : GetFont
// purpose :
// =======================================================================
Handle(Font_SystemFont) Font_FontMgr::GetFont(const Handle(TCollection_HAsciiString)& theFontName, Handle(Font_SystemFont) Font_FontMgr::GetFont(const Handle(TCollection_HAsciiString)& theFontName,
const Font_FontAspect theFontAspect, const Font_FontAspect theFontAspect,
const Standard_Integer theFontSize) const const Standard_Integer theFontSize) const
@ -975,19 +945,15 @@ Handle(Font_SystemFont) Font_FontMgr::GetFont(const Handle(TCollection_HAsciiStr
: Handle(Font_SystemFont)(); : Handle(Font_SystemFont)();
} }
// ======================================================================= //=================================================================================================
// function : GetFont
// purpose :
// =======================================================================
Handle(Font_SystemFont) Font_FontMgr::GetFont(const TCollection_AsciiString& theFontName) const Handle(Font_SystemFont) Font_FontMgr::GetFont(const TCollection_AsciiString& theFontName) const
{ {
return myFontMap.Find(theFontName); return myFontMap.Find(theFontName);
} }
// ======================================================================= //=================================================================================================
// function : FindFallbackFont
// purpose :
// =======================================================================
Handle(Font_SystemFont) Font_FontMgr::FindFallbackFont(Font_UnicodeSubset theSubset, Handle(Font_SystemFont) Font_FontMgr::FindFallbackFont(Font_UnicodeSubset theSubset,
Font_FontAspect theFontAspect) const Font_FontAspect theFontAspect) const
{ {
@ -1032,10 +998,8 @@ Handle(Font_SystemFont) Font_FontMgr::FindFallbackFont(Font_UnicodeSubset theSub
return aFont; return aFont;
} }
// ======================================================================= //=================================================================================================
// function : FindFont
// purpose :
// =======================================================================
Handle(Font_SystemFont) Font_FontMgr::FindFont(const TCollection_AsciiString& theFontName, Handle(Font_SystemFont) Font_FontMgr::FindFont(const TCollection_AsciiString& theFontName,
Font_StrictLevel theStrictLevel, Font_StrictLevel theStrictLevel,
Font_FontAspect& theFontAspect, Font_FontAspect& theFontAspect,
@ -1145,10 +1109,8 @@ Handle(Font_SystemFont) Font_FontMgr::FindFont(const TCollection_AsciiString& th
return aFont; return aFont;
} }
// ======================================================================= //=================================================================================================
// function : Font_FontMap::Find
// purpose :
// =======================================================================
Handle(Font_SystemFont) Font_FontMgr::Font_FontMap::Find( Handle(Font_SystemFont) Font_FontMgr::Font_FontMap::Find(
const TCollection_AsciiString& theFontName) const const TCollection_AsciiString& theFontName) const
{ {
@ -1169,10 +1131,8 @@ Handle(Font_SystemFont) Font_FontMgr::Font_FontMap::Find(
return Handle(Font_SystemFont)(); return Handle(Font_SystemFont)();
} }
// ======================================================================= //=================================================================================================
// function : EmbedFallbackFont
// purpose :
// =======================================================================
Handle(NCollection_Buffer) Font_FontMgr::EmbedFallbackFont() Handle(NCollection_Buffer) Font_FontMgr::EmbedFallbackFont()
{ {
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE

View File

@ -20,10 +20,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Font_SystemFont, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Font_SystemFont, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Font_SystemFont
// purpose :
// =======================================================================
Font_SystemFont::Font_SystemFont(const TCollection_AsciiString& theFontName) Font_SystemFont::Font_SystemFont(const TCollection_AsciiString& theFontName)
: myFontKey(theFontName), : myFontKey(theFontName),
myFontName(theFontName), myFontName(theFontName),
@ -37,10 +35,8 @@ Font_SystemFont::Font_SystemFont(const TCollection_AsciiString& theFontName)
myFontKey.LowerCase(); myFontKey.LowerCase();
} }
// ======================================================================= //=================================================================================================
// function : SetFontPath
// purpose :
// =======================================================================
void Font_SystemFont::SetFontPath(Font_FontAspect theAspect, void Font_SystemFont::SetFontPath(Font_FontAspect theAspect,
const TCollection_AsciiString& thePath, const TCollection_AsciiString& thePath,
const Standard_Integer theFaceId) const Standard_Integer theFaceId)
@ -53,19 +49,15 @@ void Font_SystemFont::SetFontPath(Font_FontAspect theAspect,
myFaceIds[theAspect] = theFaceId; myFaceIds[theAspect] = theFaceId;
} }
// ======================================================================= //=================================================================================================
// function : IsEqual
// purpose :
// =======================================================================
Standard_Boolean Font_SystemFont::IsEqual(const Handle(Font_SystemFont)& theOtherFont) const Standard_Boolean Font_SystemFont::IsEqual(const Handle(Font_SystemFont)& theOtherFont) const
{ {
return theOtherFont.get() == this || myFontKey.IsEqual(theOtherFont->myFontKey); return theOtherFont.get() == this || myFontKey.IsEqual(theOtherFont->myFontKey);
} }
// ======================================================================= //=================================================================================================
// function : ToString
// purpose :
// =======================================================================
TCollection_AsciiString Font_SystemFont::ToString() const TCollection_AsciiString Font_SystemFont::ToString() const
{ {
TCollection_AsciiString aDesc; TCollection_AsciiString aDesc;

View File

@ -51,10 +51,8 @@ inline void moveY(NCollection_Vector<Vec2f>& theCorners,
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : Font_TextFormatter
// purpose :
// =======================================================================
Font_TextFormatter::Font_TextFormatter() Font_TextFormatter::Font_TextFormatter()
: myAlignX(Graphic3d_HTA_LEFT), : myAlignX(Graphic3d_HTA_LEFT),
myAlignY(Graphic3d_VTA_TOP), myAlignY(Graphic3d_VTA_TOP),
@ -80,10 +78,8 @@ Font_TextFormatter::Font_TextFormatter()
// //
} }
// ======================================================================= //=================================================================================================
// function : SetupAlignment
// purpose :
// =======================================================================
void Font_TextFormatter::SetupAlignment(const Graphic3d_HorizontalTextAlignment theAlignX, void Font_TextFormatter::SetupAlignment(const Graphic3d_HorizontalTextAlignment theAlignX,
const Graphic3d_VerticalTextAlignment theAlignY) const Graphic3d_VerticalTextAlignment theAlignY)
{ {
@ -91,10 +87,8 @@ void Font_TextFormatter::SetupAlignment(const Graphic3d_HorizontalTextAlignment
myAlignY = theAlignY; myAlignY = theAlignY;
} }
// ======================================================================= //=================================================================================================
// function : Reset
// purpose :
// =======================================================================
void Font_TextFormatter::Reset() void Font_TextFormatter::Reset()
{ {
myIsFormatted = false; myIsFormatted = false;
@ -108,10 +102,8 @@ void Font_TextFormatter::Reset()
myMaxSymbolWidth = 0.0f; myMaxSymbolWidth = 0.0f;
} }
// ======================================================================= //=================================================================================================
// function : Append
// purpose :
// =======================================================================
void Font_TextFormatter::Append(const NCollection_String& theString, Font_FTFont& theFont) void Font_TextFormatter::Append(const NCollection_String& theString, Font_FTFont& theFont)
{ {
if (theString.IsEmpty()) if (theString.IsEmpty())
@ -164,10 +156,8 @@ void Font_TextFormatter::Append(const NCollection_String& theString, Font_FTFont
myLastSymbolWidth = myPen.x() - myCorners.Last().x(); myLastSymbolWidth = myPen.x() - myCorners.Last().x();
} }
// ======================================================================= //=================================================================================================
// function : newLine
// purpose :
// =======================================================================
void Font_TextFormatter::newLine(const Standard_Integer theLastRect, void Font_TextFormatter::newLine(const Standard_Integer theLastRect,
const Standard_ShortReal theMaxLineWidth) const Standard_ShortReal theMaxLineWidth)
{ {
@ -208,10 +198,8 @@ void Font_TextFormatter::newLine(const Standard_Integer theLastRect,
myRectLineStart = theLastRect + 1; myRectLineStart = theLastRect + 1;
} }
// ======================================================================= //=================================================================================================
// function : Format
// purpose :
// =======================================================================
void Font_TextFormatter::Format() void Font_TextFormatter::Format()
{ {
if (myCorners.Length() == 0 || myIsFormatted) if (myCorners.Length() == 0 || myIsFormatted)
@ -326,10 +314,8 @@ void Font_TextFormatter::Format()
} }
} }
// ======================================================================= //=================================================================================================
// function : GlyphBoundingBox
// purpose :
// =======================================================================
Standard_Boolean Font_TextFormatter::GlyphBoundingBox(const Standard_Integer theIndex, Standard_Boolean Font_TextFormatter::GlyphBoundingBox(const Standard_Integer theIndex,
Font_Rect& theBndBox) const Font_Rect& theBndBox) const
{ {
@ -375,10 +361,8 @@ Standard_Boolean Font_TextFormatter::GlyphBoundingBox(const Standard_Integer the
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : IsLFSymbol
// purpose :
// =======================================================================
Standard_Boolean Font_TextFormatter::IsLFSymbol(const Standard_Integer theIndex) const Standard_Boolean Font_TextFormatter::IsLFSymbol(const Standard_Integer theIndex) const
{ {
Font_Rect aBndBox; Font_Rect aBndBox;
@ -390,10 +374,8 @@ Standard_Boolean Font_TextFormatter::IsLFSymbol(const Standard_Integer theIndex)
return Abs(aBndBox.Right - aBndBox.Left) < Precision::Confusion(); return Abs(aBndBox.Right - aBndBox.Left) < Precision::Confusion();
} }
// ======================================================================= //=================================================================================================
// function : FirstPosition
// purpose :
// =======================================================================
Standard_ShortReal Font_TextFormatter::FirstPosition() const Standard_ShortReal Font_TextFormatter::FirstPosition() const
{ {
switch (myAlignX) switch (myAlignX)
@ -408,10 +390,8 @@ Standard_ShortReal Font_TextFormatter::FirstPosition() const
} }
} }
// ======================================================================= //=================================================================================================
// function : LinePositionIndex
// purpose :
// =======================================================================
Standard_Integer Font_TextFormatter::LinePositionIndex(const Standard_Integer theIndex) const Standard_Integer Font_TextFormatter::LinePositionIndex(const Standard_Integer theIndex) const
{ {
Standard_Integer anIndex = 0; Standard_Integer anIndex = 0;
@ -428,10 +408,8 @@ Standard_Integer Font_TextFormatter::LinePositionIndex(const Standard_Integer th
return anIndex; return anIndex;
} }
// ======================================================================= //=================================================================================================
// function : LineIndex
// purpose :
// =======================================================================
Standard_Integer Font_TextFormatter::LineIndex(const Standard_Integer theIndex) const Standard_Integer Font_TextFormatter::LineIndex(const Standard_Integer theIndex) const
{ {
if (myLineSpacing < 0.0f) if (myLineSpacing < 0.0f)
@ -442,10 +420,8 @@ Standard_Integer Font_TextFormatter::LineIndex(const Standard_Integer theIndex)
return (Standard_Integer)Abs((BottomLeft(theIndex).y() + myAscender) / myLineSpacing); return (Standard_Integer)Abs((BottomLeft(theIndex).y() + myAscender) / myLineSpacing);
} }
// ======================================================================= //=================================================================================================
// function : LineWidth
// purpose :
// =======================================================================
Standard_ShortReal Font_TextFormatter::LineWidth(const Standard_Integer theIndex) const Standard_ShortReal Font_TextFormatter::LineWidth(const Standard_Integer theIndex) const
{ {
if (theIndex < 0) if (theIndex < 0)

View File

@ -43,10 +43,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangles, Graphic3d_ArrayOfPrimit
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangleStrips, Graphic3d_ArrayOfPrimitives) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangleStrips, Graphic3d_ArrayOfPrimitives)
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfPolygons, Graphic3d_ArrayOfPrimitives) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ArrayOfPolygons, Graphic3d_ArrayOfPrimitives)
// ======================================================================= //=================================================================================================
// function : CreateArray
// purpose :
// =======================================================================
Handle(Graphic3d_ArrayOfPrimitives) Graphic3d_ArrayOfPrimitives::CreateArray( Handle(Graphic3d_ArrayOfPrimitives) Graphic3d_ArrayOfPrimitives::CreateArray(
Graphic3d_TypeOfPrimitiveArray theType, Graphic3d_TypeOfPrimitiveArray theType,
Standard_Integer theMaxVertexs, Standard_Integer theMaxVertexs,
@ -92,10 +90,8 @@ Handle(Graphic3d_ArrayOfPrimitives) Graphic3d_ArrayOfPrimitives::CreateArray(
return Handle(Graphic3d_ArrayOfPrimitives)(); return Handle(Graphic3d_ArrayOfPrimitives)();
} }
// ======================================================================= //=================================================================================================
// function : init
// purpose :
// =======================================================================
void Graphic3d_ArrayOfPrimitives::init(Graphic3d_TypeOfPrimitiveArray theType, void Graphic3d_ArrayOfPrimitives::init(Graphic3d_TypeOfPrimitiveArray theType,
Standard_Integer theMaxVertexs, Standard_Integer theMaxVertexs,
Standard_Integer theMaxBounds, Standard_Integer theMaxBounds,
@ -217,10 +213,8 @@ void Graphic3d_ArrayOfPrimitives::init(Graphic3d_TypeOfPrimitiveArray theType,
} }
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_ArrayOfPrimitives
// purpose :
// =======================================================================
Graphic3d_ArrayOfPrimitives::~Graphic3d_ArrayOfPrimitives() Graphic3d_ArrayOfPrimitives::~Graphic3d_ArrayOfPrimitives()
{ {
myIndices.Nullify(); myIndices.Nullify();
@ -228,10 +222,8 @@ Graphic3d_ArrayOfPrimitives::~Graphic3d_ArrayOfPrimitives()
myBounds.Nullify(); myBounds.Nullify();
} }
// ======================================================================= //=================================================================================================
// function : AddBound
// purpose :
// =======================================================================
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer theEdgeNumber) Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer theEdgeNumber)
{ {
Standard_OutOfRange_Raise_if(myBounds.IsNull() || myBounds->NbBounds >= myBounds->NbMaxBounds, Standard_OutOfRange_Raise_if(myBounds.IsNull() || myBounds->NbBounds >= myBounds->NbMaxBounds,
@ -240,10 +232,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer th
return ++myBounds->NbBounds; return ++myBounds->NbBounds;
} }
// ======================================================================= //=================================================================================================
// function : AddBound
// purpose :
// =======================================================================
Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer theEdgeNumber, Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer theEdgeNumber,
const Standard_Real theR, const Standard_Real theR,
const Standard_Real theG, const Standard_Real theG,
@ -257,10 +247,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddBound(const Standard_Integer th
return myBounds->NbBounds; return myBounds->NbBounds;
} }
// ======================================================================= //=================================================================================================
// function : AddEdge
// purpose :
// =======================================================================
Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(const Standard_Integer theVertexIndex) Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(const Standard_Integer theVertexIndex)
{ {
Standard_OutOfRange_Raise_if(myIndices.IsNull() Standard_OutOfRange_Raise_if(myIndices.IsNull()
@ -273,10 +261,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::AddEdge(const Standard_Integer the
return ++myIndices->NbElements; return ++myIndices->NbElements;
} }
// ======================================================================= //=================================================================================================
// function : AddTriangleStripEdges
// purpose :
// =======================================================================
void Graphic3d_ArrayOfPrimitives::AddTriangleStripEdges(Standard_Integer theVertexLower, void Graphic3d_ArrayOfPrimitives::AddTriangleStripEdges(Standard_Integer theVertexLower,
Standard_Integer theVertexUpper) Standard_Integer theVertexUpper)
{ {
@ -300,10 +286,8 @@ void Graphic3d_ArrayOfPrimitives::AddTriangleStripEdges(Standard_Integer theVert
} }
} }
// ======================================================================= //=================================================================================================
// function : AddTriangleFanEdges
// purpose :
// =======================================================================
void Graphic3d_ArrayOfPrimitives::AddTriangleFanEdges(Standard_Integer theVertexLower, void Graphic3d_ArrayOfPrimitives::AddTriangleFanEdges(Standard_Integer theVertexLower,
Standard_Integer theVertexUpper, Standard_Integer theVertexUpper,
Standard_Boolean theToClose) Standard_Boolean theToClose)
@ -323,10 +307,8 @@ void Graphic3d_ArrayOfPrimitives::AddTriangleFanEdges(Standard_Integer theVertex
} }
} }
// ======================================================================= //=================================================================================================
// function : AddPolylineEdges
// purpose :
// =======================================================================
void Graphic3d_ArrayOfPrimitives::AddPolylineEdges(Standard_Integer theVertexLower, void Graphic3d_ArrayOfPrimitives::AddPolylineEdges(Standard_Integer theVertexLower,
Standard_Integer theVertexUpper, Standard_Integer theVertexUpper,
Standard_Boolean theToClose) Standard_Boolean theToClose)
@ -346,10 +328,8 @@ void Graphic3d_ArrayOfPrimitives::AddPolylineEdges(Standard_Integer theVertexLow
} }
} }
// ======================================================================= //=================================================================================================
// function : StringType
// purpose :
// =======================================================================
Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const
{ {
switch (myType) switch (myType)
@ -386,10 +366,8 @@ Standard_CString Graphic3d_ArrayOfPrimitives::StringType() const
return "UndefinedArray"; return "UndefinedArray";
} }
// ======================================================================= //=================================================================================================
// function : ItemNumber
// purpose :
// =======================================================================
Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const
{ {
if (myAttribs.IsNull()) if (myAttribs.IsNull())
@ -440,10 +418,8 @@ Standard_Integer Graphic3d_ArrayOfPrimitives::ItemNumber() const
return -1; return -1;
} }
// ======================================================================= //=================================================================================================
// function : IsValid
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_ArrayOfPrimitives::IsValid() Standard_Boolean Graphic3d_ArrayOfPrimitives::IsValid()
{ {
if (myAttribs.IsNull()) if (myAttribs.IsNull())

View File

@ -17,19 +17,15 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectFillArea3d, Graphic3d_Aspects) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectFillArea3d, Graphic3d_Aspects)
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectFillArea3d
// purpose :
// =======================================================================
Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d() Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d()
{ {
myInteriorStyle = Aspect_IS_EMPTY; myInteriorStyle = Aspect_IS_EMPTY;
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectFillArea3d
// purpose :
// =======================================================================
Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d( Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d(
const Aspect_InteriorStyle theInteriorStyle, const Aspect_InteriorStyle theInteriorStyle,
const Quantity_Color& theInteriorColor, const Quantity_Color& theInteriorColor,

View File

@ -17,10 +17,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectLine3d, Graphic3d_Aspects) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectLine3d, Graphic3d_Aspects)
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectLine3d
// purpose :
// =======================================================================
Graphic3d_AspectLine3d::Graphic3d_AspectLine3d() Graphic3d_AspectLine3d::Graphic3d_AspectLine3d()
{ {
myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myShadingModel = Graphic3d_TypeOfShadingModel_Unlit;
@ -29,10 +27,8 @@ Graphic3d_AspectLine3d::Graphic3d_AspectLine3d()
myLineWidth = 1.0f; myLineWidth = 1.0f;
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectLine3d
// purpose :
// =======================================================================
Graphic3d_AspectLine3d::Graphic3d_AspectLine3d(const Quantity_Color& theColor, Graphic3d_AspectLine3d::Graphic3d_AspectLine3d(const Quantity_Color& theColor,
Aspect_TypeOfLine theType, Aspect_TypeOfLine theType,
Standard_Real theWidth) Standard_Real theWidth)

View File

@ -17,10 +17,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectMarker3d, Graphic3d_Aspects) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectMarker3d, Graphic3d_Aspects)
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectMarker3d
// purpose :
// =======================================================================
Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d() Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d()
{ {
myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myShadingModel = Graphic3d_TypeOfShadingModel_Unlit;
@ -29,10 +27,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d()
myMarkerScale = 1.0f; myMarkerScale = 1.0f;
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectMarker3d
// purpose :
// =======================================================================
Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Aspect_TypeOfMarker theType, Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Aspect_TypeOfMarker theType,
const Quantity_Color& theColor, const Quantity_Color& theColor,
const Standard_Real theScale) const Standard_Real theScale)
@ -43,10 +39,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Aspect_TypeOfMarker the
SetMarkerScale((float)theScale); SetMarkerScale((float)theScale);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectMarker3d
// purpose :
// =======================================================================
Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d( Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(
const Quantity_Color& theColor, const Quantity_Color& theColor,
const Standard_Integer theWidth, const Standard_Integer theWidth,
@ -59,10 +53,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(
myMarkerScale = 1.0f; myMarkerScale = 1.0f;
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectMarker3d
// purpose :
// =======================================================================
Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Handle(Image_PixMap)& theTextureImage) Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Handle(Image_PixMap)& theTextureImage)
{ {
myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myShadingModel = Graphic3d_TypeOfShadingModel_Unlit;
@ -72,10 +64,8 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d(const Handle(Image_PixMap)& t
myMarkerScale = 1.0f; myMarkerScale = 1.0f;
} }
// ======================================================================= //=================================================================================================
// function : GetTextureSize
// purpose :
// =======================================================================
void Graphic3d_AspectMarker3d::GetTextureSize(Standard_Integer& theWidth, void Graphic3d_AspectMarker3d::GetTextureSize(Standard_Integer& theWidth,
Standard_Integer& theHeight) const Standard_Integer& theHeight) const
{ {
@ -90,10 +80,8 @@ void Graphic3d_AspectMarker3d::GetTextureSize(Standard_Integer& theWidth,
} }
} }
// ======================================================================= //=================================================================================================
// function : SetBitMap
// purpose :
// =======================================================================
void Graphic3d_AspectMarker3d::SetBitMap(const Standard_Integer theWidth, void Graphic3d_AspectMarker3d::SetBitMap(const Standard_Integer theWidth,
const Standard_Integer theHeight, const Standard_Integer theHeight,
const Handle(TColStd_HArray1OfByte)& theTextureBitMap) const Handle(TColStd_HArray1OfByte)& theTextureBitMap)

View File

@ -17,10 +17,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectText3d, Graphic3d_Aspects) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectText3d, Graphic3d_Aspects)
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectText3d
// purpose :
// =======================================================================
Graphic3d_AspectText3d::Graphic3d_AspectText3d() Graphic3d_AspectText3d::Graphic3d_AspectText3d()
{ {
SetAlphaMode(Graphic3d_AlphaMode_MaskBlend, 0.285f); SetAlphaMode(Graphic3d_AlphaMode_MaskBlend, 0.285f);
@ -29,10 +27,8 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d()
myEdgeColor.SetRGB(Quantity_NOC_WHITE); myEdgeColor.SetRGB(Quantity_NOC_WHITE);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_AspectText3d
// purpose :
// =======================================================================
Graphic3d_AspectText3d::Graphic3d_AspectText3d(const Quantity_Color& theColor, Graphic3d_AspectText3d::Graphic3d_AspectText3d(const Quantity_Color& theColor,
Standard_CString theFont, Standard_CString theFont,
Standard_Real, Standard_Real,
@ -52,10 +48,8 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d(const Quantity_Color& theColor,
} }
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_AspectText3d::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const void Graphic3d_AspectText3d::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)

View File

@ -16,10 +16,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Aspects, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Aspects, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Aspects
// purpose :
// =======================================================================
Graphic3d_Aspects::Graphic3d_Aspects() Graphic3d_Aspects::Graphic3d_Aspects()
: myInteriorColor(Quantity_NOC_CYAN1), : myInteriorColor(Quantity_NOC_CYAN1),
myBackInteriorColor(Quantity_NOC_CYAN1), myBackInteriorColor(Quantity_NOC_CYAN1),
@ -49,10 +47,8 @@ Graphic3d_Aspects::Graphic3d_Aspects()
// //
} }
// ======================================================================= //=================================================================================================
// function : SetTextureMap
// purpose :
// =======================================================================
void Graphic3d_Aspects::SetTextureMap(const Handle(Graphic3d_TextureMap)& theTexture) void Graphic3d_Aspects::SetTextureMap(const Handle(Graphic3d_TextureMap)& theTexture)
{ {
if (theTexture.IsNull()) if (theTexture.IsNull())

View File

@ -15,10 +15,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AttribBuffer, Graphic3d_Buffer) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AttribBuffer, Graphic3d_Buffer)
// ======================================================================= //=================================================================================================
// function : Graphic3d_AttribBuffer
// purpose :
// =======================================================================
Graphic3d_AttribBuffer::Graphic3d_AttribBuffer(const Handle(NCollection_BaseAllocator)& theAlloc) Graphic3d_AttribBuffer::Graphic3d_AttribBuffer(const Handle(NCollection_BaseAllocator)& theAlloc)
: Graphic3d_Buffer(theAlloc), : Graphic3d_Buffer(theAlloc),
myIsInterleaved(Standard_True), myIsInterleaved(Standard_True),
@ -26,10 +24,8 @@ Graphic3d_AttribBuffer::Graphic3d_AttribBuffer(const Handle(NCollection_BaseAllo
{ {
} }
// ======================================================================= //=================================================================================================
// function : Init
// purpose :
// =======================================================================
bool Graphic3d_AttribBuffer::Init(const Standard_Integer theNbElems, bool Graphic3d_AttribBuffer::Init(const Standard_Integer theNbElems,
const Graphic3d_Attribute* theAttribs, const Graphic3d_Attribute* theAttribs,
const Standard_Integer theNbAttribs) const Standard_Integer theNbAttribs)
@ -47,10 +43,8 @@ bool Graphic3d_AttribBuffer::Init(const Standard_Integer theNbElems,
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : SetMutable
// purpose :
// =======================================================================
void Graphic3d_AttribBuffer::SetMutable(Standard_Boolean theMutable) void Graphic3d_AttribBuffer::SetMutable(Standard_Boolean theMutable)
{ {
if (mySize > (Standard_Size)IntegerLast() && theMutable) if (mySize > (Standard_Size)IntegerLast() && theMutable)
@ -61,10 +55,8 @@ void Graphic3d_AttribBuffer::SetMutable(Standard_Boolean theMutable)
myIsMutable = theMutable; myIsMutable = theMutable;
} }
// ======================================================================= //=================================================================================================
// function : Invalidate
// purpose :
// =======================================================================
void Graphic3d_AttribBuffer::SetInterleaved(Standard_Boolean theIsInterleaved) void Graphic3d_AttribBuffer::SetInterleaved(Standard_Boolean theIsInterleaved)
{ {
if (NbMaxElements() != 0) if (NbMaxElements() != 0)
@ -75,10 +67,8 @@ void Graphic3d_AttribBuffer::SetInterleaved(Standard_Boolean theIsInterleaved)
myIsInterleaved = theIsInterleaved; myIsInterleaved = theIsInterleaved;
} }
// ======================================================================= //=================================================================================================
// function : invalidate
// purpose :
// =======================================================================
void Graphic3d_AttribBuffer::invalidate(const Graphic3d_BufferRange& theRange) void Graphic3d_AttribBuffer::invalidate(const Graphic3d_BufferRange& theRange)
{ {
if (mySize > (Standard_Size)IntegerLast()) if (mySize > (Standard_Size)IntegerLast())
@ -90,10 +80,8 @@ void Graphic3d_AttribBuffer::invalidate(const Graphic3d_BufferRange& theRange)
myInvalidatedRange.Unite(theRange); myInvalidatedRange.Unite(theRange);
} }
// ======================================================================= //=================================================================================================
// function : Invalidate
// purpose :
// =======================================================================
void Graphic3d_AttribBuffer::Invalidate() void Graphic3d_AttribBuffer::Invalidate()
{ {
if (mySize > (Standard_Size)IntegerLast()) if (mySize > (Standard_Size)IntegerLast())
@ -105,10 +93,8 @@ void Graphic3d_AttribBuffer::Invalidate()
invalidate(Graphic3d_BufferRange(0, (Standard_Integer)mySize)); invalidate(Graphic3d_BufferRange(0, (Standard_Integer)mySize));
} }
// ======================================================================= //=================================================================================================
// function : Invalidate
// purpose :
// =======================================================================
void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex) void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex)
{ {
Standard_OutOfRange_Raise_if(theAttributeIndex < 0 || theAttributeIndex >= NbAttributes, Standard_OutOfRange_Raise_if(theAttributeIndex < 0 || theAttributeIndex >= NbAttributes,
@ -136,10 +122,8 @@ void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex)
} }
} }
// ======================================================================= //=================================================================================================
// function : Invalidate
// purpose :
// =======================================================================
void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex, void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex,
Standard_Integer theVertexLower, Standard_Integer theVertexLower,
Standard_Integer theVertexUpper) Standard_Integer theVertexUpper)
@ -172,10 +156,8 @@ void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theAttributeIndex,
} }
} }
// ======================================================================= //=================================================================================================
// function : Invalidate
// purpose :
// =======================================================================
void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theVertexLower, void Graphic3d_AttribBuffer::Invalidate(Standard_Integer theVertexLower,
Standard_Integer theVertexUpper) Standard_Integer theVertexUpper)
{ {

View File

@ -19,10 +19,8 @@
#include <algorithm> #include <algorithm>
// ======================================================================= //=================================================================================================
// function : Serialize
// purpose :
// =======================================================================
Graphic3d_Vec4 Graphic3d_Fresnel::Serialize() const Graphic3d_Vec4 Graphic3d_Fresnel::Serialize() const
{ {
Graphic3d_Vec4 aData = Graphic3d_Vec4(myFresnelData, 0.f); Graphic3d_Vec4 aData = Graphic3d_Vec4(myFresnelData, 0.f);
@ -35,19 +33,15 @@ Graphic3d_Vec4 Graphic3d_Fresnel::Serialize() const
return aData; return aData;
} }
// ======================================================================= //=================================================================================================
// function : fresnelNormal
// purpose :
// =======================================================================
inline float fresnelNormal(float theN, float theK) inline float fresnelNormal(float theN, float theK)
{ {
return ((theN - 1.f) * (theN - 1.f) + theK * theK) / ((theN + 1.f) * (theN + 1.f) + theK * theK); return ((theN - 1.f) * (theN - 1.f) + theK * theK) / ((theN + 1.f) * (theN + 1.f) + theK * theK);
} }
// ======================================================================= //=================================================================================================
// function : CreateConductor
// purpose :
// =======================================================================
Graphic3d_Fresnel Graphic3d_Fresnel::CreateConductor(const Graphic3d_Vec3& theRefractionIndex, Graphic3d_Fresnel Graphic3d_Fresnel::CreateConductor(const Graphic3d_Vec3& theRefractionIndex,
const Graphic3d_Vec3& theAbsorptionIndex) const Graphic3d_Vec3& theAbsorptionIndex)
{ {
@ -66,10 +60,8 @@ void Graphic3d_Fresnel::DumpJson(Standard_OStream& theOStream, Standard_Integer
OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, myFresnelType) OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, myFresnelType)
OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, &myFresnelData)} OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, &myFresnelData)}
// ======================================================================= //=================================================================================================
// function : Graphic3d_BSDF
// purpose :
// =======================================================================
Graphic3d_BSDF::Graphic3d_BSDF() Graphic3d_BSDF::Graphic3d_BSDF()
: Ks(Graphic3d_Vec3(0.f), 1.f) : Ks(Graphic3d_Vec3(0.f), 1.f)
{ {
@ -88,10 +80,8 @@ bool Graphic3d_BSDF::operator==(const Graphic3d_BSDF& theOther) const
&& FresnelCoat == theOther.FresnelCoat && FresnelBase == theOther.FresnelBase; && FresnelCoat == theOther.FresnelCoat && FresnelBase == theOther.FresnelBase;
} }
// ======================================================================= //=================================================================================================
// function : Normalize
// purpose :
// =======================================================================
void Graphic3d_BSDF::Normalize() void Graphic3d_BSDF::Normalize()
{ {
float aMax = 0.f; float aMax = 0.f;
@ -112,10 +102,8 @@ void Graphic3d_BSDF::Normalize()
} }
} }
// ======================================================================= //=================================================================================================
// function : CreateDiffuse
// purpose :
// =======================================================================
Graphic3d_BSDF Graphic3d_BSDF::CreateDiffuse(const Graphic3d_Vec3& theWeight) Graphic3d_BSDF Graphic3d_BSDF::CreateDiffuse(const Graphic3d_Vec3& theWeight)
{ {
Graphic3d_BSDF aBSDF; Graphic3d_BSDF aBSDF;
@ -125,10 +113,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateDiffuse(const Graphic3d_Vec3& theWeight)
return aBSDF; return aBSDF;
} }
// ======================================================================= //=================================================================================================
// function : CreateMetallic
// purpose :
// =======================================================================
Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic(const Graphic3d_Vec3& theWeight, Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic(const Graphic3d_Vec3& theWeight,
const Graphic3d_Fresnel& theFresnel, const Graphic3d_Fresnel& theFresnel,
const float theRoughness) const float theRoughness)
@ -144,10 +130,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic(const Graphic3d_Vec3& theWeight
return aBSDF; return aBSDF;
} }
// ======================================================================= //=================================================================================================
// function : CreateTransparent
// purpose :
// =======================================================================
Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent(const Graphic3d_Vec3& theWeight, Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent(const Graphic3d_Vec3& theWeight,
const Graphic3d_Vec3& theAbsorptionColor, const Graphic3d_Vec3& theAbsorptionColor,
const float theAbsorptionCoeff) const float theAbsorptionCoeff)
@ -170,10 +154,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent(const Graphic3d_Vec3& theWeight
return aBSDF; return aBSDF;
} }
// ======================================================================= //=================================================================================================
// function : CreateGlass
// purpose :
// =======================================================================
Graphic3d_BSDF Graphic3d_BSDF::CreateGlass(const Graphic3d_Vec3& theWeight, Graphic3d_BSDF Graphic3d_BSDF::CreateGlass(const Graphic3d_Vec3& theWeight,
const Graphic3d_Vec3& theAbsorptionColor, const Graphic3d_Vec3& theAbsorptionColor,
const float theAbsorptionCoeff, const float theAbsorptionCoeff,
@ -195,10 +177,8 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateGlass(const Graphic3d_Vec3& theWeight,
return aBSDF; return aBSDF;
} }
// ======================================================================= //=================================================================================================
// function : CreateMetallicRoughness
// purpose :
// =======================================================================
Graphic3d_BSDF Graphic3d_BSDF::CreateMetallicRoughness(const Graphic3d_PBRMaterial& thePbr) Graphic3d_BSDF Graphic3d_BSDF::CreateMetallicRoughness(const Graphic3d_PBRMaterial& thePbr)
{ {
const Graphic3d_Vec3 aDiff = (Graphic3d_Vec3)thePbr.Color().GetRGB() * thePbr.Alpha(); const Graphic3d_Vec3 aDiff = (Graphic3d_Vec3)thePbr.Color().GetRGB() * thePbr.Alpha();

View File

@ -22,20 +22,16 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_IndexBuffer, Graphic3d_Buffer)
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BoundBuffer, NCollection_Buffer) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BoundBuffer, NCollection_Buffer)
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MutableIndexBuffer, Graphic3d_IndexBuffer) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MutableIndexBuffer, Graphic3d_IndexBuffer)
// ======================================================================= //=================================================================================================
// function : DefaultAllocator
// purpose :
// =======================================================================
const Handle(NCollection_BaseAllocator)& Graphic3d_Buffer::DefaultAllocator() const Handle(NCollection_BaseAllocator)& Graphic3d_Buffer::DefaultAllocator()
{ {
static const Handle(NCollection_BaseAllocator) THE_ALLOC = new NCollection_AlignedAllocator(16); static const Handle(NCollection_BaseAllocator) THE_ALLOC = new NCollection_AlignedAllocator(16);
return THE_ALLOC; return THE_ALLOC;
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_Buffer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const void Graphic3d_Buffer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)

View File

@ -20,38 +20,30 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BvhCStructureSet, BVH_PrimitiveSet3d) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BvhCStructureSet, BVH_PrimitiveSet3d)
// ======================================================================= //=================================================================================================
// function : Graphic3d_BvhCStructureSet
// purpose :
// =======================================================================
Graphic3d_BvhCStructureSet::Graphic3d_BvhCStructureSet() Graphic3d_BvhCStructureSet::Graphic3d_BvhCStructureSet()
{ {
myBuilder = new BVH_BinnedBuilder<Standard_Real, 3>(BVH_Constants_LeafNodeSizeSingle, myBuilder = new BVH_BinnedBuilder<Standard_Real, 3>(BVH_Constants_LeafNodeSizeSingle,
BVH_Constants_MaxTreeDepth); BVH_Constants_MaxTreeDepth);
} }
// ======================================================================= //=================================================================================================
// function : Size
// purpose :
// =======================================================================
Standard_Integer Graphic3d_BvhCStructureSet::Size() const Standard_Integer Graphic3d_BvhCStructureSet::Size() const
{ {
return myStructs.Size(); return myStructs.Size();
} }
// ======================================================================= //=================================================================================================
// function : Box
// purpose :
// =======================================================================
Graphic3d_BndBox3d Graphic3d_BvhCStructureSet::Box(const Standard_Integer theIdx) const Graphic3d_BndBox3d Graphic3d_BvhCStructureSet::Box(const Standard_Integer theIdx) const
{ {
return myStructs.FindKey(theIdx + 1)->BoundingBox(); return myStructs.FindKey(theIdx + 1)->BoundingBox();
} }
// ======================================================================= //=================================================================================================
// function : Center
// purpose :
// =======================================================================
Standard_Real Graphic3d_BvhCStructureSet::Center(const Standard_Integer theIdx, Standard_Real Graphic3d_BvhCStructureSet::Center(const Standard_Integer theIdx,
const Standard_Integer theAxis) const const Standard_Integer theAxis) const
{ {
@ -63,20 +55,16 @@ Standard_Real Graphic3d_BvhCStructureSet::Center(const Standard_Integer theIdx,
return aCenter; return aCenter;
} }
// ======================================================================= //=================================================================================================
// function : Swap
// purpose :
// =======================================================================
void Graphic3d_BvhCStructureSet::Swap(const Standard_Integer theIdx1, void Graphic3d_BvhCStructureSet::Swap(const Standard_Integer theIdx1,
const Standard_Integer theIdx2) const Standard_Integer theIdx2)
{ {
myStructs.Swap(theIdx1 + 1, theIdx2 + 1); myStructs.Swap(theIdx1 + 1, theIdx2 + 1);
} }
// ======================================================================= //=================================================================================================
// function : Add
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_BvhCStructureSet::Add(const Graphic3d_CStructure* theStruct) Standard_Boolean Graphic3d_BvhCStructureSet::Add(const Graphic3d_CStructure* theStruct)
{ {
const Standard_Integer aSize = myStructs.Size(); const Standard_Integer aSize = myStructs.Size();
@ -91,10 +79,8 @@ Standard_Boolean Graphic3d_BvhCStructureSet::Add(const Graphic3d_CStructure* the
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : Remove
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_BvhCStructureSet::Remove(const Graphic3d_CStructure* theStruct) Standard_Boolean Graphic3d_BvhCStructureSet::Remove(const Graphic3d_CStructure* theStruct)
{ {
const Standard_Integer anIndex = myStructs.FindIndex(theStruct); const Standard_Integer anIndex = myStructs.FindIndex(theStruct);
@ -111,20 +97,16 @@ Standard_Boolean Graphic3d_BvhCStructureSet::Remove(const Graphic3d_CStructure*
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : Clear
// purpose :
// =======================================================================
void Graphic3d_BvhCStructureSet::Clear() void Graphic3d_BvhCStructureSet::Clear()
{ {
myStructs.Clear(); myStructs.Clear();
MarkDirty(); MarkDirty();
} }
// ======================================================================= //=================================================================================================
// function : GetStructureById
// purpose :
// =======================================================================
const Graphic3d_CStructure* Graphic3d_BvhCStructureSet::GetStructureById(Standard_Integer theId) const Graphic3d_CStructure* Graphic3d_BvhCStructureSet::GetStructureById(Standard_Integer theId)
{ {
return myStructs.FindKey(theId + 1); return myStructs.FindKey(theId + 1);

View File

@ -17,10 +17,8 @@
#include <Graphic3d_CStructure.hxx> #include <Graphic3d_CStructure.hxx>
// ======================================================================= //=================================================================================================
// function : Graphic3d_BvhCStructureSetTrsfPers
// purpose :
// =======================================================================
Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers( Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers(
const Handle(BVH_Builder3d)& theBuilder) const Handle(BVH_Builder3d)& theBuilder)
: myIsDirty(Standard_False), : myIsDirty(Standard_False),
@ -30,28 +28,22 @@ Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers(
// //
} }
// ======================================================================= //=================================================================================================
// function : Size
// purpose :
// =======================================================================
Standard_Integer Graphic3d_BvhCStructureSetTrsfPers::Size() const Standard_Integer Graphic3d_BvhCStructureSetTrsfPers::Size() const
{ {
return myStructs.Size(); return myStructs.Size();
} }
// ======================================================================= //=================================================================================================
// function : Box
// purpose :
// =======================================================================
Graphic3d_BndBox3d Graphic3d_BvhCStructureSetTrsfPers::Box(const Standard_Integer theIdx) const Graphic3d_BndBox3d Graphic3d_BvhCStructureSetTrsfPers::Box(const Standard_Integer theIdx) const
{ {
return *myStructBoxes(theIdx + 1); return *myStructBoxes(theIdx + 1);
} }
// ======================================================================= //=================================================================================================
// function : Center
// purpose :
// =======================================================================
Standard_Real Graphic3d_BvhCStructureSetTrsfPers::Center(const Standard_Integer theIdx, Standard_Real Graphic3d_BvhCStructureSetTrsfPers::Center(const Standard_Integer theIdx,
const Standard_Integer theAxis) const const Standard_Integer theAxis) const
{ {
@ -59,10 +51,8 @@ Standard_Real Graphic3d_BvhCStructureSetTrsfPers::Center(const Standard_Integer
return (aBndBox.CornerMin()[theAxis] + aBndBox.CornerMax()[theAxis]) * 0.5; return (aBndBox.CornerMin()[theAxis] + aBndBox.CornerMax()[theAxis]) * 0.5;
} }
// ======================================================================= //=================================================================================================
// function : Swap
// purpose :
// =======================================================================
void Graphic3d_BvhCStructureSetTrsfPers::Swap(const Standard_Integer theIdx1, void Graphic3d_BvhCStructureSetTrsfPers::Swap(const Standard_Integer theIdx1,
const Standard_Integer theIdx2) const Standard_Integer theIdx2)
{ {
@ -73,10 +63,8 @@ void Graphic3d_BvhCStructureSetTrsfPers::Swap(const Standard_Integer theIdx1,
myStructBoxes.Swap(aStructIdx1, aStructIdx2); myStructBoxes.Swap(aStructIdx1, aStructIdx2);
} }
// ======================================================================= //=================================================================================================
// function : Add
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Add(const Graphic3d_CStructure* theStruct) Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Add(const Graphic3d_CStructure* theStruct)
{ {
const Standard_Integer aSize = myStructs.Size(); const Standard_Integer aSize = myStructs.Size();
@ -91,10 +79,8 @@ Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Add(const Graphic3d_CStruct
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : Remove
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Remove(const Graphic3d_CStructure* theStruct) Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Remove(const Graphic3d_CStructure* theStruct)
{ {
const Standard_Integer anIndex = myStructs.FindIndex(theStruct); const Standard_Integer anIndex = myStructs.FindIndex(theStruct);
@ -111,20 +97,16 @@ Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Remove(const Graphic3d_CStr
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : Clear
// purpose :
// =======================================================================
void Graphic3d_BvhCStructureSetTrsfPers::Clear() void Graphic3d_BvhCStructureSetTrsfPers::Clear()
{ {
myStructs.Clear(); myStructs.Clear();
MarkDirty(); MarkDirty();
} }
// ======================================================================= //=================================================================================================
// function : GetStructureById
// purpose :
// =======================================================================
const Graphic3d_CStructure* Graphic3d_BvhCStructureSetTrsfPers::GetStructureById( const Graphic3d_CStructure* Graphic3d_BvhCStructureSetTrsfPers::GetStructureById(
Standard_Integer theId) Standard_Integer theId)
{ {

View File

@ -24,10 +24,8 @@ namespace
static volatile Standard_Integer THE_LIGHT_COUNTER = 0; static volatile Standard_Integer THE_LIGHT_COUNTER = 0;
} }
// ======================================================================= //=================================================================================================
// function : makeId
// purpose :
// =======================================================================
void Graphic3d_CLight::makeId() void Graphic3d_CLight::makeId()
{ {
TCollection_AsciiString aTypeSuffix; TCollection_AsciiString aTypeSuffix;
@ -51,10 +49,8 @@ void Graphic3d_CLight::makeId()
+ TCollection_AsciiString(Standard_Atomic_Increment(&THE_LIGHT_COUNTER)); + TCollection_AsciiString(Standard_Atomic_Increment(&THE_LIGHT_COUNTER));
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_CLight
// purpose :
// =======================================================================
Graphic3d_CLight::Graphic3d_CLight(Graphic3d_TypeOfLightSource theType) Graphic3d_CLight::Graphic3d_CLight(Graphic3d_TypeOfLightSource theType)
: myPosition(0.0, 0.0, 0.0), : myPosition(0.0, 0.0, 0.0),
myColor(1.0f, 1.0f, 1.0f, 1.0f), myColor(1.0f, 1.0f, 1.0f, 1.0f),
@ -94,10 +90,8 @@ Graphic3d_CLight::Graphic3d_CLight(Graphic3d_TypeOfLightSource theType)
makeId(); makeId();
} }
// ======================================================================= //=================================================================================================
// function : CopyFrom
// purpose :
// =======================================================================
void Graphic3d_CLight::CopyFrom(const Handle(Graphic3d_CLight)& theLight) void Graphic3d_CLight::CopyFrom(const Handle(Graphic3d_CLight)& theLight)
{ {
myName = theLight->myName; myName = theLight->myName;
@ -127,30 +121,24 @@ void Graphic3d_CLight::CopyFrom(const Handle(Graphic3d_CLight)& theLight)
} }
} }
// ======================================================================= //=================================================================================================
// function : SetColor
// purpose :
// =======================================================================
void Graphic3d_CLight::SetColor(const Quantity_Color& theColor) void Graphic3d_CLight::SetColor(const Quantity_Color& theColor)
{ {
updateRevisionIf(myColor.GetRGB().IsDifferent(theColor)); updateRevisionIf(myColor.GetRGB().IsDifferent(theColor));
myColor.SetRGB(theColor); myColor.SetRGB(theColor);
} }
// ======================================================================= //=================================================================================================
// function : SetEnabled
// purpose :
// =======================================================================
void Graphic3d_CLight::SetEnabled(Standard_Boolean theIsOn) void Graphic3d_CLight::SetEnabled(Standard_Boolean theIsOn)
{ {
updateRevisionIf(myIsEnabled != theIsOn); updateRevisionIf(myIsEnabled != theIsOn);
myIsEnabled = theIsOn; myIsEnabled = theIsOn;
} }
// ======================================================================= //=================================================================================================
// function : SetCastShadows
// purpose :
// =======================================================================
void Graphic3d_CLight::SetCastShadows(Standard_Boolean theToCast) void Graphic3d_CLight::SetCastShadows(Standard_Boolean theToCast)
{ {
if (myType != Graphic3d_TypeOfLightSource_Directional if (myType != Graphic3d_TypeOfLightSource_Directional
@ -163,10 +151,8 @@ void Graphic3d_CLight::SetCastShadows(Standard_Boolean theToCast)
myToCastShadows = theToCast; myToCastShadows = theToCast;
} }
// ======================================================================= //=================================================================================================
// function : SetHeadlight
// purpose :
// =======================================================================
void Graphic3d_CLight::SetHeadlight(Standard_Boolean theValue) void Graphic3d_CLight::SetHeadlight(Standard_Boolean theValue)
{ {
if (myType == Graphic3d_TypeOfLightSource_Ambient) if (myType == Graphic3d_TypeOfLightSource_Ambient)
@ -178,10 +164,8 @@ void Graphic3d_CLight::SetHeadlight(Standard_Boolean theValue)
myIsHeadlight = theValue; myIsHeadlight = theValue;
} }
// ======================================================================= //=================================================================================================
// function : SetDirection
// purpose :
// =======================================================================
void Graphic3d_CLight::SetDirection(const gp_Dir& theDir) void Graphic3d_CLight::SetDirection(const gp_Dir& theDir)
{ {
Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot
@ -197,10 +181,8 @@ void Graphic3d_CLight::SetDirection(const gp_Dir& theDir)
myDirection.z() = static_cast<Standard_ShortReal>(theDir.Z()); myDirection.z() = static_cast<Standard_ShortReal>(theDir.Z());
} }
// ======================================================================= //=================================================================================================
// function : SetPosition
// purpose :
// =======================================================================
void Graphic3d_CLight::SetPosition(const gp_Pnt& thePosition) void Graphic3d_CLight::SetPosition(const gp_Pnt& thePosition)
{ {
Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot
@ -210,10 +192,8 @@ void Graphic3d_CLight::SetPosition(const gp_Pnt& thePosition)
myPosition = thePosition; myPosition = thePosition;
} }
// ======================================================================= //=================================================================================================
// function : SetDisplayPosition
// purpose :
// =======================================================================
void Graphic3d_CLight::SetDisplayPosition(const gp_Pnt& thePosition) void Graphic3d_CLight::SetDisplayPosition(const gp_Pnt& thePosition)
{ {
Standard_ProgramError_Raise_if(myType == Graphic3d_TypeOfLightSource_Ambient, Standard_ProgramError_Raise_if(myType == Graphic3d_TypeOfLightSource_Ambient,
@ -222,10 +202,8 @@ void Graphic3d_CLight::SetDisplayPosition(const gp_Pnt& thePosition)
myPosition = thePosition; myPosition = thePosition;
} }
// ======================================================================= //=================================================================================================
// function : SetIntensity
// purpose :
// =======================================================================
void Graphic3d_CLight::SetIntensity(Standard_ShortReal theValue) void Graphic3d_CLight::SetIntensity(Standard_ShortReal theValue)
{ {
Standard_OutOfRange_Raise_if(theValue <= 0.0f, Standard_OutOfRange_Raise_if(theValue <= 0.0f,
@ -234,10 +212,8 @@ void Graphic3d_CLight::SetIntensity(Standard_ShortReal theValue)
myIntensity = theValue; myIntensity = theValue;
} }
// ======================================================================= //=================================================================================================
// function : SetAngle
// purpose :
// =======================================================================
void Graphic3d_CLight::SetAngle(Standard_ShortReal theAngle) void Graphic3d_CLight::SetAngle(Standard_ShortReal theAngle)
{ {
Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot, Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot,
@ -248,10 +224,8 @@ void Graphic3d_CLight::SetAngle(Standard_ShortReal theAngle)
changeAngle() = theAngle; changeAngle() = theAngle;
} }
// ======================================================================= //=================================================================================================
// function : SetAttenuation
// purpose :
// =======================================================================
void Graphic3d_CLight::SetAttenuation(Standard_ShortReal theConstAttenuation, void Graphic3d_CLight::SetAttenuation(Standard_ShortReal theConstAttenuation,
Standard_ShortReal theLinearAttenuation) Standard_ShortReal theLinearAttenuation)
{ {
@ -267,10 +241,8 @@ void Graphic3d_CLight::SetAttenuation(Standard_ShortReal theConstAttenuation,
changeLinearAttenuation() = theLinearAttenuation; changeLinearAttenuation() = theLinearAttenuation;
} }
// ======================================================================= //=================================================================================================
// function : SetConcentration
// purpose :
// =======================================================================
void Graphic3d_CLight::SetConcentration(Standard_ShortReal theConcentration) void Graphic3d_CLight::SetConcentration(Standard_ShortReal theConcentration)
{ {
Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot, Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Spot,
@ -281,10 +253,8 @@ void Graphic3d_CLight::SetConcentration(Standard_ShortReal theConcentration)
changeConcentration() = theConcentration; changeConcentration() = theConcentration;
} }
// ======================================================================= //=================================================================================================
// function : SetSmoothRadius
// purpose :
// =======================================================================
void Graphic3d_CLight::SetSmoothRadius(Standard_ShortReal theValue) void Graphic3d_CLight::SetSmoothRadius(Standard_ShortReal theValue)
{ {
Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Positional Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Positional
@ -297,10 +267,8 @@ void Graphic3d_CLight::SetSmoothRadius(Standard_ShortReal theValue)
mySmoothness = theValue; mySmoothness = theValue;
} }
// ======================================================================= //=================================================================================================
// function : SetSmoothAngle
// purpose :
// =======================================================================
void Graphic3d_CLight::SetSmoothAngle(Standard_ShortReal theValue) void Graphic3d_CLight::SetSmoothAngle(Standard_ShortReal theValue)
{ {
Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Directional, Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Directional,
@ -311,10 +279,8 @@ void Graphic3d_CLight::SetSmoothAngle(Standard_ShortReal theValue)
mySmoothness = theValue; mySmoothness = theValue;
} }
// ======================================================================= //=================================================================================================
// function : SetRange
// purpose :
// =======================================================================
void Graphic3d_CLight::SetRange(Standard_ShortReal theValue) void Graphic3d_CLight::SetRange(Standard_ShortReal theValue)
{ {
Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Positional Standard_ProgramError_Raise_if(myType != Graphic3d_TypeOfLightSource_Positional

View File

@ -63,10 +63,8 @@ Graphic3d_CView::~Graphic3d_CView()
} }
} }
// ======================================================================= //=================================================================================================
// function : SetBackgroundSkydome
// purpose :
// =======================================================================
void Graphic3d_CView::SetBackgroundSkydome(const Aspect_SkydomeBackground& theAspect, void Graphic3d_CView::SetBackgroundSkydome(const Aspect_SkydomeBackground& theAspect,
Standard_Boolean theToUpdatePBREnv) Standard_Boolean theToUpdatePBREnv)
{ {
@ -81,10 +79,8 @@ void Graphic3d_CView::SetBackgroundSkydome(const Aspect_SkydomeBackground& theAs
} }
} }
// ======================================================================= //=================================================================================================
// function : Activate
// purpose :
// =======================================================================
void Graphic3d_CView::Activate() void Graphic3d_CView::Activate()
{ {
if (!IsActive()) if (!IsActive())
@ -120,10 +116,8 @@ void Graphic3d_CView::Activate()
Update(); Update();
} }
// ======================================================================= //=================================================================================================
// function : Deactivate
// purpose :
// =======================================================================
void Graphic3d_CView::Deactivate() void Graphic3d_CView::Deactivate()
{ {
if (IsActive()) if (IsActive())
@ -157,10 +151,8 @@ void Graphic3d_CView::Deactivate()
} }
} }
// ======================================================================== //=================================================================================================
// function : Remove
// purpose :
// ========================================================================
void Graphic3d_CView::Remove() void Graphic3d_CView::Remove()
{ {
if (IsRemoved()) if (IsRemoved())
@ -202,19 +194,15 @@ void Graphic3d_CView::Remove()
myIsRemoved = Standard_True; myIsRemoved = Standard_True;
} }
// ======================================================================== //=================================================================================================
// function : AddSubview
// purpose :
// ========================================================================
void Graphic3d_CView::AddSubview(const Handle(Graphic3d_CView)& theView) void Graphic3d_CView::AddSubview(const Handle(Graphic3d_CView)& theView)
{ {
mySubviews.Append(theView); mySubviews.Append(theView);
} }
// ======================================================================== //=================================================================================================
// function : RemoveSubview
// purpose :
// ========================================================================
bool Graphic3d_CView::RemoveSubview(const Graphic3d_CView* theView) bool Graphic3d_CView::RemoveSubview(const Graphic3d_CView* theView)
{ {
for (NCollection_Sequence<Handle(Graphic3d_CView)>::Iterator aViewIter(mySubviews); for (NCollection_Sequence<Handle(Graphic3d_CView)>::Iterator aViewIter(mySubviews);
@ -230,10 +218,8 @@ bool Graphic3d_CView::RemoveSubview(const Graphic3d_CView* theView)
return false; return false;
} }
// ======================================================================== //=================================================================================================
// function : Resized
// purpose :
// ========================================================================
void Graphic3d_CView::Resized() void Graphic3d_CView::Resized()
{ {
if (IsSubview()) if (IsSubview())
@ -256,10 +242,8 @@ static int getSubViewOffset(double theOffset, int theWinSize)
} }
} }
// ======================================================================== //=================================================================================================
// function : SubviewResized
// purpose :
// ========================================================================
void Graphic3d_CView::SubviewResized(const Handle(Aspect_NeutralWindow)& theWindow) void Graphic3d_CView::SubviewResized(const Handle(Aspect_NeutralWindow)& theWindow)
{ {
if (!IsSubview() || theWindow.IsNull()) if (!IsSubview() || theWindow.IsNull())
@ -311,10 +295,8 @@ void Graphic3d_CView::SubviewResized(const Handle(Aspect_NeutralWindow)& theWind
theWindow->SetSize(aViewSize.x(), aViewSize.y()); theWindow->SetSize(aViewSize.x(), aViewSize.y());
} }
// ======================================================================== //=================================================================================================
// function : SetComputedMode
// purpose :
// ========================================================================
void Graphic3d_CView::SetComputedMode(const Standard_Boolean theMode) void Graphic3d_CView::SetComputedMode(const Standard_Boolean theMode)
{ {
if ((theMode && myIsInComputedMode) || (!theMode && !myIsInComputedMode)) if ((theMode && myIsInComputedMode) || (!theMode && !myIsInComputedMode))
@ -428,10 +410,8 @@ void Graphic3d_CView::SetComputedMode(const Standard_Boolean theMode)
Update(); Update();
} }
// ======================================================================= //=================================================================================================
// function : ReCompute
// purpose :
// =======================================================================
void Graphic3d_CView::ReCompute(const Handle(Graphic3d_Structure)& theStruct) void Graphic3d_CView::ReCompute(const Handle(Graphic3d_Structure)& theStruct)
{ {
theStruct->CalculateBoundBox(); theStruct->CalculateBoundBox();
@ -512,19 +492,15 @@ void Graphic3d_CView::ReCompute(const Handle(Graphic3d_Structure)& theStruct)
myStructsComputed.Remove(anIndex); myStructsComputed.Remove(anIndex);
} }
// ======================================================================= //=================================================================================================
// function : Update
// purpose :
// =======================================================================
void Graphic3d_CView::Update(const Graphic3d_ZLayerId theLayerId) void Graphic3d_CView::Update(const Graphic3d_ZLayerId theLayerId)
{ {
InvalidateZLayerBoundingBox(theLayerId); InvalidateZLayerBoundingBox(theLayerId);
} }
// ======================================================================= //=================================================================================================
// function : InvalidateZLayerBoundingBox
// purpose :
// =======================================================================
void Graphic3d_CView::InvalidateZLayerBoundingBox(const Graphic3d_ZLayerId theLayerId) void Graphic3d_CView::InvalidateZLayerBoundingBox(const Graphic3d_ZLayerId theLayerId)
{ {
if (Handle(Graphic3d_Layer) aLayer = Layer(theLayerId)) if (Handle(Graphic3d_Layer) aLayer = Layer(theLayerId))
@ -544,10 +520,8 @@ void Graphic3d_CView::InvalidateZLayerBoundingBox(const Graphic3d_ZLayerId theLa
} }
} }
// ======================================================================= //=================================================================================================
// function : DisplayedStructures
// purpose :
// =======================================================================
void Graphic3d_CView::DisplayedStructures(Graphic3d_MapOfStructure& theStructures) const void Graphic3d_CView::DisplayedStructures(Graphic3d_MapOfStructure& theStructures) const
{ {
for (Graphic3d_MapOfStructure::Iterator aStructIter(myStructsDisplayed); aStructIter.More(); for (Graphic3d_MapOfStructure::Iterator aStructIter(myStructsDisplayed); aStructIter.More();
@ -557,10 +531,8 @@ void Graphic3d_CView::DisplayedStructures(Graphic3d_MapOfStructure& theStructure
} }
} }
// ======================================================================= //=================================================================================================
// function : MinMaxValues
// purpose :
// =======================================================================
Bnd_Box Graphic3d_CView::MinMaxValues(const Standard_Boolean theToIncludeAuxiliary) const Bnd_Box Graphic3d_CView::MinMaxValues(const Standard_Boolean theToIncludeAuxiliary) const
{ {
if (!IsDefined()) if (!IsDefined())
@ -587,10 +559,8 @@ Bnd_Box Graphic3d_CView::MinMaxValues(const Standard_Boolean theToIncludeAuxilia
return aResult; return aResult;
} }
// ======================================================================= //=================================================================================================
// function : ConsiderZoomPersistenceObjects
// purpose :
// =======================================================================
Standard_Real Graphic3d_CView::ConsiderZoomPersistenceObjects() Standard_Real Graphic3d_CView::ConsiderZoomPersistenceObjects()
{ {
if (!IsDefined()) if (!IsDefined())
@ -617,10 +587,8 @@ Standard_Real Graphic3d_CView::ConsiderZoomPersistenceObjects()
return aMaxCoef; return aMaxCoef;
} }
// ======================================================================= //=================================================================================================
// function : MinMaxValues
// purpose :
// =======================================================================
Bnd_Box Graphic3d_CView::MinMaxValues(const Graphic3d_MapOfStructure& theSet, Bnd_Box Graphic3d_CView::MinMaxValues(const Graphic3d_MapOfStructure& theSet,
const Standard_Boolean theToIgnoreInfiniteFlag) const const Standard_Boolean theToIgnoreInfiniteFlag) const
{ {
@ -687,10 +655,8 @@ Bnd_Box Graphic3d_CView::MinMaxValues(const Graphic3d_MapOfStructure& theSet,
return aResult; return aResult;
} }
// ======================================================================= //=================================================================================================
// function : acceptDisplay
// purpose :
// =======================================================================
Graphic3d_TypeOfAnswer Graphic3d_CView::acceptDisplay( Graphic3d_TypeOfAnswer Graphic3d_CView::acceptDisplay(
const Graphic3d_TypeOfStructure theStructType) const const Graphic3d_TypeOfStructure theStructType) const
{ {
@ -715,10 +681,8 @@ Graphic3d_TypeOfAnswer Graphic3d_CView::acceptDisplay(
return Graphic3d_TOA_NO; return Graphic3d_TOA_NO;
} }
// ======================================================================= //=================================================================================================
// function : Compute
// purpose :
// =======================================================================
void Graphic3d_CView::Compute() void Graphic3d_CView::Compute()
{ {
// force HLRValidation to False on all structures calculated in the view // force HLRValidation to False on all structures calculated in the view
@ -763,10 +727,8 @@ void Graphic3d_CView::Compute()
} }
} }
// ======================================================================= //=================================================================================================
// function : Clear
// purpose :
// =======================================================================
void Graphic3d_CView::Clear(Graphic3d_Structure* theStructure, void Graphic3d_CView::Clear(Graphic3d_Structure* theStructure,
const Standard_Boolean theWithDestruction) const Standard_Boolean theWithDestruction)
{ {
@ -779,10 +741,8 @@ void Graphic3d_CView::Clear(Graphic3d_Structure* theStructure,
} }
} }
// ======================================================================= //=================================================================================================
// function : Connect
// purpose :
// =======================================================================
void Graphic3d_CView::Connect(const Graphic3d_Structure* theMother, void Graphic3d_CView::Connect(const Graphic3d_Structure* theMother,
const Graphic3d_Structure* theDaughter) const Graphic3d_Structure* theDaughter)
{ {
@ -796,10 +756,8 @@ void Graphic3d_CView::Connect(const Graphic3d_Structure* theMother,
} }
} }
// ======================================================================= //=================================================================================================
// function : Disconnect
// purpose :
// =======================================================================
void Graphic3d_CView::Disconnect(const Graphic3d_Structure* theMother, void Graphic3d_CView::Disconnect(const Graphic3d_Structure* theMother,
const Graphic3d_Structure* theDaughter) const Graphic3d_Structure* theDaughter)
{ {
@ -813,10 +771,8 @@ void Graphic3d_CView::Disconnect(const Graphic3d_Structure* theMother,
} }
} }
// ======================================================================= //=================================================================================================
// function : Display
// purpose :
// =======================================================================
void Graphic3d_CView::Display(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_CView::Display(const Handle(Graphic3d_Structure)& theStructure)
{ {
if (!IsActive()) if (!IsActive())
@ -977,10 +933,8 @@ void Graphic3d_CView::Display(const Handle(Graphic3d_Structure)& theStructure)
Update(aStruct->GetZLayer()); Update(aStruct->GetZLayer());
} }
// ======================================================================= //=================================================================================================
// function : Erase
// purpose :
// =======================================================================
void Graphic3d_CView::Erase(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_CView::Erase(const Handle(Graphic3d_Structure)& theStructure)
{ {
if (!IsDisplayed(theStructure)) if (!IsDisplayed(theStructure))
@ -1011,10 +965,8 @@ void Graphic3d_CView::Erase(const Handle(Graphic3d_Structure)& theStructure)
Update(theStructure->GetZLayer()); Update(theStructure->GetZLayer());
} }
// ======================================================================= //=================================================================================================
// function : Highlight
// purpose :
// =======================================================================
void Graphic3d_CView::Highlight(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_CView::Highlight(const Handle(Graphic3d_Structure)& theStructure)
{ {
const Standard_Integer anIndex = IsComputed(theStructure); const Standard_Integer anIndex = IsComputed(theStructure);
@ -1025,10 +977,8 @@ void Graphic3d_CView::Highlight(const Handle(Graphic3d_Structure)& theStructure)
} }
} }
// ======================================================================= //=================================================================================================
// function : SetTransform
// purpose :
// =======================================================================
void Graphic3d_CView::SetTransform(const Handle(Graphic3d_Structure)& theStructure, void Graphic3d_CView::SetTransform(const Handle(Graphic3d_Structure)& theStructure,
const Handle(TopLoc_Datum3D)& theTrsf) const Handle(TopLoc_Datum3D)& theTrsf)
{ {
@ -1061,10 +1011,8 @@ void Graphic3d_CView::SetTransform(const Handle(Graphic3d_Structure)& theStructu
} }
} }
// ======================================================================= //=================================================================================================
// function : UnHighlight
// purpose :
// =======================================================================
void Graphic3d_CView::UnHighlight(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_CView::UnHighlight(const Handle(Graphic3d_Structure)& theStructure)
{ {
Standard_Integer anIndex = IsComputed(theStructure); Standard_Integer anIndex = IsComputed(theStructure);
@ -1075,10 +1023,8 @@ void Graphic3d_CView::UnHighlight(const Handle(Graphic3d_Structure)& theStructur
} }
} }
// ======================================================================== //=================================================================================================
// function : IsComputed
// purpose :
// ========================================================================
Standard_Boolean Graphic3d_CView::IsComputed(const Standard_Integer theStructId, Standard_Boolean Graphic3d_CView::IsComputed(const Standard_Integer theStructId,
Handle(Graphic3d_Structure)& theComputedStruct) const Handle(Graphic3d_Structure)& theComputedStruct) const
{ {
@ -1098,10 +1044,8 @@ Standard_Boolean Graphic3d_CView::IsComputed(const Standard_Integer theStr
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : IsComputed
// purpose :
// =======================================================================
Standard_Integer Graphic3d_CView::IsComputed(const Graphic3d_Structure* theStructure) const Standard_Integer Graphic3d_CView::IsComputed(const Graphic3d_Structure* theStructure) const
{ {
const Standard_Integer aStructId = theStructure->Identification(); const Standard_Integer aStructId = theStructure->Identification();
@ -1118,19 +1062,15 @@ Standard_Integer Graphic3d_CView::IsComputed(const Graphic3d_Structure* theStruc
return 0; return 0;
} }
// ======================================================================= //=================================================================================================
// function : IsDisplayed
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_CView::IsDisplayed(const Handle(Graphic3d_Structure)& theStructure) const Standard_Boolean Graphic3d_CView::IsDisplayed(const Handle(Graphic3d_Structure)& theStructure) const
{ {
return myStructsDisplayed.Contains(theStructure); return myStructsDisplayed.Contains(theStructure);
} }
// ======================================================================= //=================================================================================================
// function : ChangePriority
// purpose :
// =======================================================================
void Graphic3d_CView::ChangePriority(const Handle(Graphic3d_Structure)& theStructure, void Graphic3d_CView::ChangePriority(const Handle(Graphic3d_Structure)& theStructure,
const Graphic3d_DisplayPriority /*theOldPriority*/, const Graphic3d_DisplayPriority /*theOldPriority*/,
const Graphic3d_DisplayPriority theNewPriority) const Graphic3d_DisplayPriority theNewPriority)
@ -1153,10 +1093,8 @@ void Graphic3d_CView::ChangePriority(const Handle(Graphic3d_Structure)& theStruc
changePriority(aCStruct, theNewPriority); changePriority(aCStruct, theNewPriority);
} }
// ======================================================================= //=================================================================================================
// function : ChangeZLayer
// purpose :
// =======================================================================
void Graphic3d_CView::ChangeZLayer(const Handle(Graphic3d_Structure)& theStructure, void Graphic3d_CView::ChangeZLayer(const Handle(Graphic3d_Structure)& theStructure,
const Graphic3d_ZLayerId theLayerId) const Graphic3d_ZLayerId theLayerId)
{ {
@ -1178,10 +1116,8 @@ void Graphic3d_CView::ChangeZLayer(const Handle(Graphic3d_Structure)& theStructu
changeZLayer(aCStruct, theLayerId); changeZLayer(aCStruct, theLayerId);
} }
// ======================================================================= //=================================================================================================
// function : HaveTheSameOwner
// purpose :
// =======================================================================
Standard_Integer Graphic3d_CView::HaveTheSameOwner( Standard_Integer Graphic3d_CView::HaveTheSameOwner(
const Handle(Graphic3d_Structure)& theStructure) const const Handle(Graphic3d_Structure)& theStructure) const
{ {
@ -1206,10 +1142,8 @@ Standard_Integer Graphic3d_CView::HaveTheSameOwner(
return 0; return 0;
} }
// ======================================================================= //=================================================================================================
// function : CopySettings
// purpose :
// =======================================================================
void Graphic3d_CView::CopySettings(const Handle(Graphic3d_CView)& theOther) void Graphic3d_CView::CopySettings(const Handle(Graphic3d_CView)& theOther)
{ {
ChangeRenderingParams() = theOther->RenderingParams(); ChangeRenderingParams() = theOther->RenderingParams();
@ -1225,10 +1159,8 @@ void Graphic3d_CView::CopySettings(const Handle(Graphic3d_CView)& theOther)
SetClipPlanes(theOther->ClipPlanes()); SetClipPlanes(theOther->ClipPlanes());
} }
// ======================================================================= //=================================================================================================
// function : SetShadingModel
// purpose :
// =======================================================================
void Graphic3d_CView::SetShadingModel(Graphic3d_TypeOfShadingModel theModel) void Graphic3d_CView::SetShadingModel(Graphic3d_TypeOfShadingModel theModel)
{ {
if (theModel == Graphic3d_TypeOfShadingModel_DEFAULT) if (theModel == Graphic3d_TypeOfShadingModel_DEFAULT)
@ -1240,10 +1172,8 @@ void Graphic3d_CView::SetShadingModel(Graphic3d_TypeOfShadingModel theModel)
myRenderParams.ShadingModel = theModel; myRenderParams.ShadingModel = theModel;
} }
// ======================================================================= //=================================================================================================
// function : SetUnitFactor
// purpose :
// =======================================================================
void Graphic3d_CView::SetUnitFactor(Standard_Real theFactor) void Graphic3d_CView::SetUnitFactor(Standard_Real theFactor)
{ {
if (theFactor <= 0.0) if (theFactor <= 0.0)
@ -1257,19 +1187,15 @@ void Graphic3d_CView::SetUnitFactor(Standard_Real theFactor)
} }
} }
// ======================================================================= //=================================================================================================
// function : IsActiveXR
// purpose :
// =======================================================================
bool Graphic3d_CView::IsActiveXR() const bool Graphic3d_CView::IsActiveXR() const
{ {
return !myXRSession.IsNull() && myXRSession->IsOpen(); return !myXRSession.IsNull() && myXRSession->IsOpen();
} }
// ======================================================================= //=================================================================================================
// function : InitXR
// purpose :
// =======================================================================
bool Graphic3d_CView::InitXR() bool Graphic3d_CView::InitXR()
{ {
if (myXRSession.IsNull()) if (myXRSession.IsNull())
@ -1289,10 +1215,8 @@ bool Graphic3d_CView::InitXR()
return myXRSession->IsOpen(); return myXRSession->IsOpen();
} }
// ======================================================================= //=================================================================================================
// function : ReleaseXR
// purpose :
// =======================================================================
void Graphic3d_CView::ReleaseXR() void Graphic3d_CView::ReleaseXR()
{ {
if (!myXRSession.IsNull()) if (!myXRSession.IsNull())

View File

@ -69,10 +69,8 @@ gp_Ax3 cameraToAx3(const Graphic3d_Camera& theCamera)
} }
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : Graphic3d_Camera
// purpose :
// =======================================================================
Graphic3d_Camera::Graphic3d_Camera() Graphic3d_Camera::Graphic3d_Camera()
: myUp(0.0, 1.0, 0.0), : myUp(0.0, 1.0, 0.0),
myDirection(0.0, 0.0, 1.0), myDirection(0.0, 0.0, 1.0),
@ -102,10 +100,8 @@ Graphic3d_Camera::Graphic3d_Camera()
this); this);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Camera
// purpose :
// =======================================================================
Graphic3d_Camera::Graphic3d_Camera(const Handle(Graphic3d_Camera)& theOther) Graphic3d_Camera::Graphic3d_Camera(const Handle(Graphic3d_Camera)& theOther)
: myUp(0.0, 1.0, 0.0), : myUp(0.0, 1.0, 0.0),
myDirection(0.0, 0.0, 1.0), myDirection(0.0, 0.0, 1.0),
@ -135,10 +131,8 @@ Graphic3d_Camera::Graphic3d_Camera(const Handle(Graphic3d_Camera)& theOther)
Copy(theOther); Copy(theOther);
} }
// ======================================================================= //=================================================================================================
// function : CopyMappingData
// purpose :
// =======================================================================
void Graphic3d_Camera::CopyMappingData(const Handle(Graphic3d_Camera)& theOtherCamera) void Graphic3d_Camera::CopyMappingData(const Handle(Graphic3d_Camera)& theOtherCamera)
{ {
SetZeroToOneDepth(theOtherCamera->IsZeroToOneDepth()); SetZeroToOneDepth(theOtherCamera->IsZeroToOneDepth());
@ -170,10 +164,8 @@ void Graphic3d_Camera::CopyMappingData(const Handle(Graphic3d_Camera)& theOtherC
} }
} }
// ======================================================================= //=================================================================================================
// function : CopyOrientationData
// purpose :
// =======================================================================
void Graphic3d_Camera::CopyOrientationData(const Handle(Graphic3d_Camera)& theOtherCamera) void Graphic3d_Camera::CopyOrientationData(const Handle(Graphic3d_Camera)& theOtherCamera)
{ {
if (!myEye.IsEqual(theOtherCamera->Eye(), 0.0) || !myUp.IsEqual(theOtherCamera->Up(), 0.0) if (!myEye.IsEqual(theOtherCamera->Eye(), 0.0) || !myUp.IsEqual(theOtherCamera->Up(), 0.0)
@ -189,30 +181,24 @@ void Graphic3d_Camera::CopyOrientationData(const Handle(Graphic3d_Camera)& theOt
SetAxialScale(theOtherCamera->AxialScale()); SetAxialScale(theOtherCamera->AxialScale());
} }
// ======================================================================= //=================================================================================================
// function : Copy
// purpose :
// =======================================================================
void Graphic3d_Camera::Copy(const Handle(Graphic3d_Camera)& theOther) void Graphic3d_Camera::Copy(const Handle(Graphic3d_Camera)& theOther)
{ {
CopyMappingData(theOther); CopyMappingData(theOther);
CopyOrientationData(theOther); CopyOrientationData(theOther);
} }
// ======================================================================= //=================================================================================================
// function : SetIdentityOrientation
// purpose :
// =======================================================================
void Graphic3d_Camera::SetIdentityOrientation() void Graphic3d_Camera::SetIdentityOrientation()
{ {
SetEyeAndCenter(gp_Pnt(0.0, 0.0, 0.0), gp_Pnt(0.0, 0.0, -1.0)); SetEyeAndCenter(gp_Pnt(0.0, 0.0, 0.0), gp_Pnt(0.0, 0.0, -1.0));
SetUp(gp_Dir(0.0, 1.0, 0.0)); SetUp(gp_Dir(0.0, 1.0, 0.0));
} }
// ======================================================================= //=================================================================================================
// function : MoveEyeTo
// purpose :
// =======================================================================
void Graphic3d_Camera::MoveEyeTo(const gp_Pnt& theEye) void Graphic3d_Camera::MoveEyeTo(const gp_Pnt& theEye)
{ {
if (myEye.IsEqual(theEye, 0.0)) if (myEye.IsEqual(theEye, 0.0))
@ -224,10 +210,8 @@ void Graphic3d_Camera::MoveEyeTo(const gp_Pnt& theEye)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetEyeAndCenter
// purpose :
// =======================================================================
void Graphic3d_Camera::SetEyeAndCenter(const gp_Pnt& theEye, const gp_Pnt& theCenter) void Graphic3d_Camera::SetEyeAndCenter(const gp_Pnt& theEye, const gp_Pnt& theCenter)
{ {
if (Eye().IsEqual(theEye, 0.0) && Center().IsEqual(theCenter, 0.0)) if (Eye().IsEqual(theEye, 0.0) && Center().IsEqual(theCenter, 0.0))
@ -244,10 +228,8 @@ void Graphic3d_Camera::SetEyeAndCenter(const gp_Pnt& theEye, const gp_Pnt& theCe
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetEye
// purpose :
// =======================================================================
void Graphic3d_Camera::SetEye(const gp_Pnt& theEye) void Graphic3d_Camera::SetEye(const gp_Pnt& theEye)
{ {
if (Eye().IsEqual(theEye, 0.0)) if (Eye().IsEqual(theEye, 0.0))
@ -265,10 +247,8 @@ void Graphic3d_Camera::SetEye(const gp_Pnt& theEye)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetCenter
// purpose :
// =======================================================================
void Graphic3d_Camera::SetCenter(const gp_Pnt& theCenter) void Graphic3d_Camera::SetCenter(const gp_Pnt& theCenter)
{ {
const Standard_Real aDistance = myEye.Distance(theCenter); const Standard_Real aDistance = myEye.Distance(theCenter);
@ -285,10 +265,8 @@ void Graphic3d_Camera::SetCenter(const gp_Pnt& theCenter)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetUp
// purpose :
// =======================================================================
void Graphic3d_Camera::SetUp(const gp_Dir& theUp) void Graphic3d_Camera::SetUp(const gp_Dir& theUp)
{ {
if (Up().IsEqual(theUp, 0.0)) if (Up().IsEqual(theUp, 0.0))
@ -300,10 +278,8 @@ void Graphic3d_Camera::SetUp(const gp_Dir& theUp)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetAxialScale
// purpose :
// =======================================================================
void Graphic3d_Camera::SetAxialScale(const gp_XYZ& theAxialScale) void Graphic3d_Camera::SetAxialScale(const gp_XYZ& theAxialScale)
{ {
Standard_OutOfRange_Raise_if(theAxialScale.X() <= 0.0 || theAxialScale.Y() <= 0.0 Standard_OutOfRange_Raise_if(theAxialScale.X() <= 0.0 || theAxialScale.Y() <= 0.0
@ -318,10 +294,8 @@ void Graphic3d_Camera::SetAxialScale(const gp_XYZ& theAxialScale)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetDistance
// purpose :
// =======================================================================
void Graphic3d_Camera::SetDistance(const Standard_Real theDistance) void Graphic3d_Camera::SetDistance(const Standard_Real theDistance)
{ {
if (myDistance == theDistance) if (myDistance == theDistance)
@ -335,10 +309,8 @@ void Graphic3d_Camera::SetDistance(const Standard_Real theDistance)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetDirectionFromEye
// purpose :
// =======================================================================
void Graphic3d_Camera::SetDirectionFromEye(const gp_Dir& theDir) void Graphic3d_Camera::SetDirectionFromEye(const gp_Dir& theDir)
{ {
if (myDirection.IsEqual(theDir, 0.0)) if (myDirection.IsEqual(theDir, 0.0))
@ -350,10 +322,8 @@ void Graphic3d_Camera::SetDirectionFromEye(const gp_Dir& theDir)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetDirection
// purpose :
// =======================================================================
void Graphic3d_Camera::SetDirection(const gp_Dir& theDir) void Graphic3d_Camera::SetDirection(const gp_Dir& theDir)
{ {
if (myDirection.IsEqual(theDir, 0.0)) if (myDirection.IsEqual(theDir, 0.0))
@ -367,10 +337,8 @@ void Graphic3d_Camera::SetDirection(const gp_Dir& theDir)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : SetScale
// purpose :
// =======================================================================
void Graphic3d_Camera::SetScale(const Standard_Real theScale) void Graphic3d_Camera::SetScale(const Standard_Real theScale)
{ {
if (Scale() == theScale) if (Scale() == theScale)
@ -397,10 +365,8 @@ void Graphic3d_Camera::SetScale(const Standard_Real theScale)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : Scale
// purpose :
// =======================================================================
Standard_Real Graphic3d_Camera::Scale() const Standard_Real Graphic3d_Camera::Scale() const
{ {
switch (myProjType) switch (myProjType)
@ -417,10 +383,8 @@ Standard_Real Graphic3d_Camera::Scale() const
} }
} }
// ======================================================================= //=================================================================================================
// function : SetProjectionType
// purpose :
// =======================================================================
void Graphic3d_Camera::SetProjectionType(const Projection theProjectionType) void Graphic3d_Camera::SetProjectionType(const Projection theProjectionType)
{ {
Projection anOldType = ProjectionType(); Projection anOldType = ProjectionType();
@ -447,10 +411,8 @@ void Graphic3d_Camera::SetProjectionType(const Projection theProjectionType)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetFOVy
// purpose :
// =======================================================================
void Graphic3d_Camera::SetFOVy(const Standard_Real theFOVy) void Graphic3d_Camera::SetFOVy(const Standard_Real theFOVy)
{ {
if (FOVy() == theFOVy) if (FOVy() == theFOVy)
@ -465,10 +427,8 @@ void Graphic3d_Camera::SetFOVy(const Standard_Real theFOVy)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetFOV2d
// purpose :
// =======================================================================
void Graphic3d_Camera::SetFOV2d(const Standard_Real theFOV) void Graphic3d_Camera::SetFOV2d(const Standard_Real theFOV)
{ {
if (FOV2d() == theFOV) if (FOV2d() == theFOV)
@ -480,10 +440,8 @@ void Graphic3d_Camera::SetFOV2d(const Standard_Real theFOV)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetZRange
// purpose :
// =======================================================================
void Graphic3d_Camera::SetZRange(const Standard_Real theZNear, const Standard_Real theZFar) void Graphic3d_Camera::SetZRange(const Standard_Real theZNear, const Standard_Real theZFar)
{ {
Standard_ASSERT_RAISE(theZFar > theZNear, "ZFar should be greater than ZNear"); Standard_ASSERT_RAISE(theZFar > theZNear, "ZFar should be greater than ZNear");
@ -504,10 +462,8 @@ void Graphic3d_Camera::SetZRange(const Standard_Real theZNear, const Standard_Re
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetAspect
// purpose :
// =======================================================================
void Graphic3d_Camera::SetAspect(const Standard_Real theAspect) void Graphic3d_Camera::SetAspect(const Standard_Real theAspect)
{ {
if (Aspect() == theAspect) if (Aspect() == theAspect)
@ -521,10 +477,8 @@ void Graphic3d_Camera::SetAspect(const Standard_Real theAspect)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetZFocus
// purpose :
// =======================================================================
void Graphic3d_Camera::SetZFocus(const FocusType theType, const Standard_Real theZFocus) void Graphic3d_Camera::SetZFocus(const FocusType theType, const Standard_Real theZFocus)
{ {
if (ZFocusType() == theType && ZFocus() == theZFocus) if (ZFocusType() == theType && ZFocus() == theZFocus)
@ -538,10 +492,8 @@ void Graphic3d_Camera::SetZFocus(const FocusType theType, const Standard_Real th
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetIOD
// purpose :
// =======================================================================
void Graphic3d_Camera::SetIOD(const IODType theType, const Standard_Real theIOD) void Graphic3d_Camera::SetIOD(const IODType theType, const Standard_Real theIOD)
{ {
if (GetIODType() == theType && IOD() == theIOD) if (GetIODType() == theType && IOD() == theIOD)
@ -555,10 +507,8 @@ void Graphic3d_Camera::SetIOD(const IODType theType, const Standard_Real theIOD)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetTile
// purpose :
// =======================================================================
void Graphic3d_Camera::SetTile(const Graphic3d_CameraTile& theTile) void Graphic3d_Camera::SetTile(const Graphic3d_CameraTile& theTile)
{ {
if (myTile == theTile) if (myTile == theTile)
@ -570,19 +520,15 @@ void Graphic3d_Camera::SetTile(const Graphic3d_CameraTile& theTile)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : OrthogonalizeUp
// purpose :
// =======================================================================
void Graphic3d_Camera::OrthogonalizeUp() void Graphic3d_Camera::OrthogonalizeUp()
{ {
SetUp(OrthogonalizedUp()); SetUp(OrthogonalizedUp());
} }
// ======================================================================= //=================================================================================================
// function : OrthogonalizedUp
// purpose :
// =======================================================================
gp_Dir Graphic3d_Camera::OrthogonalizedUp() const gp_Dir Graphic3d_Camera::OrthogonalizedUp() const
{ {
gp_Dir aDir = Direction(); gp_Dir aDir = Direction();
@ -592,10 +538,8 @@ gp_Dir Graphic3d_Camera::OrthogonalizedUp() const
return aLeft.Crossed(aDir); return aLeft.Crossed(aDir);
} }
// ======================================================================= //=================================================================================================
// function : Transform
// purpose :
// =======================================================================
void Graphic3d_Camera::Transform(const gp_Trsf& theTrsf) void Graphic3d_Camera::Transform(const gp_Trsf& theTrsf)
{ {
if (theTrsf.Form() == gp_Identity) if (theTrsf.Form() == gp_Identity)
@ -609,10 +553,8 @@ void Graphic3d_Camera::Transform(const gp_Trsf& theTrsf)
InvalidateOrientation(); InvalidateOrientation();
} }
// ======================================================================= //=================================================================================================
// function : safePointCast
// purpose :
// =======================================================================
static Graphic3d_Vec4d safePointCast(const gp_Pnt& thePnt) static Graphic3d_Vec4d safePointCast(const gp_Pnt& thePnt)
{ {
Standard_Real aLim = 1e15f; Standard_Real aLim = 1e15f;
@ -633,10 +575,8 @@ static Graphic3d_Vec4d safePointCast(const gp_Pnt& thePnt)
return aPnt; return aPnt;
} }
// ======================================================================= //=================================================================================================
// function : Project
// purpose :
// =======================================================================
gp_Pnt Graphic3d_Camera::Project(const gp_Pnt& thePnt) const gp_Pnt Graphic3d_Camera::Project(const gp_Pnt& thePnt) const
{ {
const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); const Graphic3d_Mat4d& aViewMx = OrientationMatrix();
@ -653,10 +593,8 @@ gp_Pnt Graphic3d_Camera::Project(const gp_Pnt& thePnt) const
return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW);
} }
// ======================================================================= //=================================================================================================
// function : UnProject
// purpose :
// =======================================================================
gp_Pnt Graphic3d_Camera::UnProject(const gp_Pnt& thePnt) const gp_Pnt Graphic3d_Camera::UnProject(const gp_Pnt& thePnt) const
{ {
const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); const Graphic3d_Mat4d& aViewMx = OrientationMatrix();
@ -682,10 +620,8 @@ gp_Pnt Graphic3d_Camera::UnProject(const gp_Pnt& thePnt) const
return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW);
} }
// ======================================================================= //=================================================================================================
// function : ConvertView2Proj
// purpose :
// =======================================================================
gp_Pnt Graphic3d_Camera::ConvertView2Proj(const gp_Pnt& thePnt) const gp_Pnt Graphic3d_Camera::ConvertView2Proj(const gp_Pnt& thePnt) const
{ {
const Graphic3d_Mat4d& aProjMx = ProjectionMatrix(); const Graphic3d_Mat4d& aProjMx = ProjectionMatrix();
@ -700,10 +636,8 @@ gp_Pnt Graphic3d_Camera::ConvertView2Proj(const gp_Pnt& thePnt) const
return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW);
} }
// ======================================================================= //=================================================================================================
// function : ConvertProj2View
// purpose :
// =======================================================================
gp_Pnt Graphic3d_Camera::ConvertProj2View(const gp_Pnt& thePnt) const gp_Pnt Graphic3d_Camera::ConvertProj2View(const gp_Pnt& thePnt) const
{ {
const Graphic3d_Mat4d& aProjMx = ProjectionMatrix(); const Graphic3d_Mat4d& aProjMx = ProjectionMatrix();
@ -726,10 +660,8 @@ gp_Pnt Graphic3d_Camera::ConvertProj2View(const gp_Pnt& thePnt) const
return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW);
} }
// ======================================================================= //=================================================================================================
// function : ConvertWorld2View
// purpose :
// =======================================================================
gp_Pnt Graphic3d_Camera::ConvertWorld2View(const gp_Pnt& thePnt) const gp_Pnt Graphic3d_Camera::ConvertWorld2View(const gp_Pnt& thePnt) const
{ {
const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); const Graphic3d_Mat4d& aViewMx = OrientationMatrix();
@ -744,10 +676,8 @@ gp_Pnt Graphic3d_Camera::ConvertWorld2View(const gp_Pnt& thePnt) const
return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW);
} }
// ======================================================================= //=================================================================================================
// function : ConvertView2World
// purpose :
// =======================================================================
gp_Pnt Graphic3d_Camera::ConvertView2World(const gp_Pnt& thePnt) const gp_Pnt Graphic3d_Camera::ConvertView2World(const gp_Pnt& thePnt) const
{ {
const Graphic3d_Mat4d& aViewMx = OrientationMatrix(); const Graphic3d_Mat4d& aViewMx = OrientationMatrix();
@ -769,10 +699,8 @@ gp_Pnt Graphic3d_Camera::ConvertView2World(const gp_Pnt& thePnt) const
return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW); return gp_Pnt(aPnt.x() * aInvW, aPnt.y() * aInvW, aPnt.z() * aInvW);
} }
// ======================================================================= //=================================================================================================
// function : ViewDimensions
// purpose :
// =======================================================================
gp_XYZ Graphic3d_Camera::ViewDimensions(const Standard_Real theZValue) const gp_XYZ Graphic3d_Camera::ViewDimensions(const Standard_Real theZValue) const
{ {
// view plane dimensions // view plane dimensions
@ -793,10 +721,8 @@ gp_XYZ Graphic3d_Camera::ViewDimensions(const Standard_Real theZValue) const
return gp_XYZ(aSizeX, aSizeY, myZFar - myZNear); return gp_XYZ(aSizeX, aSizeY, myZFar - myZNear);
} }
// ======================================================================= //=================================================================================================
// function : Frustum
// purpose :
// =======================================================================
void Graphic3d_Camera::Frustum(gp_Pln& theLeft, void Graphic3d_Camera::Frustum(gp_Pln& theLeft,
gp_Pln& theRight, gp_Pln& theRight,
gp_Pln& theBottom, gp_Pln& theBottom,
@ -851,82 +777,64 @@ void Graphic3d_Camera::Frustum(gp_Pln& theLeft,
theTop = gp_Pln(aPntTop, aDirTop); theTop = gp_Pln(aPntTop, aDirTop);
} }
// ======================================================================= //=================================================================================================
// function : OrientationMatrix
// purpose :
// =======================================================================
const Graphic3d_Mat4d& Graphic3d_Camera::OrientationMatrix() const const Graphic3d_Mat4d& Graphic3d_Camera::OrientationMatrix() const
{ {
return UpdateOrientation(myMatricesD).Orientation; return UpdateOrientation(myMatricesD).Orientation;
} }
// ======================================================================= //=================================================================================================
// function : OrientationMatrixF
// purpose :
// =======================================================================
const Graphic3d_Mat4& Graphic3d_Camera::OrientationMatrixF() const const Graphic3d_Mat4& Graphic3d_Camera::OrientationMatrixF() const
{ {
return UpdateOrientation(myMatricesF).Orientation; return UpdateOrientation(myMatricesF).Orientation;
} }
// ======================================================================= //=================================================================================================
// function : ProjectionMatrix
// purpose :
// =======================================================================
const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionMatrix() const const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionMatrix() const
{ {
return UpdateProjection(myMatricesD).MProjection; return UpdateProjection(myMatricesD).MProjection;
} }
// ======================================================================= //=================================================================================================
// function : ProjectionMatrixF
// purpose :
// =======================================================================
const Graphic3d_Mat4& Graphic3d_Camera::ProjectionMatrixF() const const Graphic3d_Mat4& Graphic3d_Camera::ProjectionMatrixF() const
{ {
return UpdateProjection(myMatricesF).MProjection; return UpdateProjection(myMatricesF).MProjection;
} }
// ======================================================================= //=================================================================================================
// function : ProjectionStereoLeft
// purpose :
// =======================================================================
const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionStereoLeft() const const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionStereoLeft() const
{ {
return UpdateProjection(myMatricesD).LProjection; return UpdateProjection(myMatricesD).LProjection;
} }
// ======================================================================= //=================================================================================================
// function : ProjectionStereoLeftF
// purpose :
// =======================================================================
const Graphic3d_Mat4& Graphic3d_Camera::ProjectionStereoLeftF() const const Graphic3d_Mat4& Graphic3d_Camera::ProjectionStereoLeftF() const
{ {
return UpdateProjection(myMatricesF).LProjection; return UpdateProjection(myMatricesF).LProjection;
} }
// ======================================================================= //=================================================================================================
// function : ProjectionStereoRight
// purpose :
// =======================================================================
const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionStereoRight() const const Graphic3d_Mat4d& Graphic3d_Camera::ProjectionStereoRight() const
{ {
return UpdateProjection(myMatricesD).RProjection; return UpdateProjection(myMatricesD).RProjection;
} }
// ======================================================================= //=================================================================================================
// function : ProjectionStereoRightF
// purpose :
// =======================================================================
const Graphic3d_Mat4& Graphic3d_Camera::ProjectionStereoRightF() const const Graphic3d_Mat4& Graphic3d_Camera::ProjectionStereoRightF() const
{ {
return UpdateProjection(myMatricesF).RProjection; return UpdateProjection(myMatricesF).RProjection;
} }
// ======================================================================= //=================================================================================================
// function : ResetCustomProjection
// purpose :
// =======================================================================
void Graphic3d_Camera::ResetCustomProjection() void Graphic3d_Camera::ResetCustomProjection()
{ {
if (myIsCustomFrustomLR || myIsCustomProjMatLR || myIsCustomProjMatM) if (myIsCustomFrustomLR || myIsCustomProjMatLR || myIsCustomProjMatM)
@ -938,10 +846,8 @@ void Graphic3d_Camera::ResetCustomProjection()
} }
} }
// ======================================================================= //=================================================================================================
// function : StereoProjection
// purpose :
// =======================================================================
void Graphic3d_Camera::StereoProjection(Graphic3d_Mat4d& theProjL, void Graphic3d_Camera::StereoProjection(Graphic3d_Mat4d& theProjL,
Graphic3d_Mat4d& theHeadToEyeL, Graphic3d_Mat4d& theHeadToEyeL,
Graphic3d_Mat4d& theProjR, Graphic3d_Mat4d& theProjR,
@ -950,10 +856,8 @@ void Graphic3d_Camera::StereoProjection(Graphic3d_Mat4d& theProjL,
stereoProjection(theProjL, theHeadToEyeL, theProjR, theHeadToEyeR); stereoProjection(theProjL, theHeadToEyeL, theProjR, theHeadToEyeR);
} }
// ======================================================================= //=================================================================================================
// function : StereoProjectionF
// purpose :
// =======================================================================
void Graphic3d_Camera::StereoProjectionF(Graphic3d_Mat4& theProjL, void Graphic3d_Camera::StereoProjectionF(Graphic3d_Mat4& theProjL,
Graphic3d_Mat4& theHeadToEyeL, Graphic3d_Mat4& theHeadToEyeL,
Graphic3d_Mat4& theProjR, Graphic3d_Mat4& theProjR,
@ -962,10 +866,8 @@ void Graphic3d_Camera::StereoProjectionF(Graphic3d_Mat4& theProjL,
stereoProjection(theProjL, theHeadToEyeL, theProjR, theHeadToEyeR); stereoProjection(theProjL, theHeadToEyeL, theProjR, theHeadToEyeR);
} }
// ======================================================================= //=================================================================================================
// function : stereoProjection
// purpose :
// =======================================================================
template <typename Elem_t> template <typename Elem_t>
void Graphic3d_Camera::stereoProjection(NCollection_Mat4<Elem_t>& theProjL, void Graphic3d_Camera::stereoProjection(NCollection_Mat4<Elem_t>& theProjL,
NCollection_Mat4<Elem_t>& theHeadToEyeL, NCollection_Mat4<Elem_t>& theHeadToEyeL,
@ -998,10 +900,8 @@ void Graphic3d_Camera::stereoProjection(NCollection_Mat4<Elem_t>& theProjL,
} }
} }
// ======================================================================= //=================================================================================================
// function : SetCustomStereoFrustums
// purpose :
// =======================================================================
void Graphic3d_Camera::SetCustomStereoFrustums(const Aspect_FrustumLRBT<Standard_Real>& theFrustumL, void Graphic3d_Camera::SetCustomStereoFrustums(const Aspect_FrustumLRBT<Standard_Real>& theFrustumL,
const Aspect_FrustumLRBT<Standard_Real>& theFrustumR) const Aspect_FrustumLRBT<Standard_Real>& theFrustumR)
{ {
@ -1012,10 +912,8 @@ void Graphic3d_Camera::SetCustomStereoFrustums(const Aspect_FrustumLRBT<Standard
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetCustomStereoProjection
// purpose :
// =======================================================================
void Graphic3d_Camera::SetCustomStereoProjection(const Graphic3d_Mat4d& theProjL, void Graphic3d_Camera::SetCustomStereoProjection(const Graphic3d_Mat4d& theProjL,
const Graphic3d_Mat4d& theHeadToEyeL, const Graphic3d_Mat4d& theHeadToEyeL,
const Graphic3d_Mat4d& theProjR, const Graphic3d_Mat4d& theProjR,
@ -1030,10 +928,8 @@ void Graphic3d_Camera::SetCustomStereoProjection(const Graphic3d_Mat4d& theProjL
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : SetCustomMonoProjection
// purpose :
// =======================================================================
void Graphic3d_Camera::SetCustomMonoProjection(const Graphic3d_Mat4d& theProj) void Graphic3d_Camera::SetCustomMonoProjection(const Graphic3d_Mat4d& theProj)
{ {
myCustomProjMatM = theProj; myCustomProjMatM = theProj;
@ -1041,10 +937,8 @@ void Graphic3d_Camera::SetCustomMonoProjection(const Graphic3d_Mat4d& theProj)
InvalidateProjection(); InvalidateProjection();
} }
// ======================================================================= //=================================================================================================
// function : computeProjection
// purpose :
// =======================================================================
template <typename Elem_t> template <typename Elem_t>
void Graphic3d_Camera::computeProjection(NCollection_Mat4<Elem_t>& theProjM, void Graphic3d_Camera::computeProjection(NCollection_Mat4<Elem_t>& theProjM,
NCollection_Mat4<Elem_t>& theProjL, NCollection_Mat4<Elem_t>& theProjL,
@ -1184,10 +1078,8 @@ void Graphic3d_Camera::computeProjection(NCollection_Mat4<Elem_t>& theProjM,
} }
} }
// ======================================================================= //=================================================================================================
// function : UpdateOrientation
// purpose :
// =======================================================================
template <typename Elem_t> template <typename Elem_t>
Graphic3d_Camera::TransformMatrices<Elem_t>& Graphic3d_Camera::UpdateOrientation( Graphic3d_Camera::TransformMatrices<Elem_t>& Graphic3d_Camera::UpdateOrientation(
TransformMatrices<Elem_t>& theMatrices) const TransformMatrices<Elem_t>& theMatrices) const
@ -1220,10 +1112,8 @@ Graphic3d_Camera::TransformMatrices<Elem_t>& Graphic3d_Camera::UpdateOrientation
return theMatrices; // for inline accessors return theMatrices; // for inline accessors
} }
// ======================================================================= //=================================================================================================
// function : InvalidateProjection
// purpose :
// =======================================================================
void Graphic3d_Camera::InvalidateProjection() void Graphic3d_Camera::InvalidateProjection()
{ {
myMatricesD.ResetProjection(); myMatricesD.ResetProjection();
@ -1232,10 +1122,8 @@ void Graphic3d_Camera::InvalidateProjection()
(Standard_Size)Standard_Atomic_Increment(&THE_STATE_COUNTER); (Standard_Size)Standard_Atomic_Increment(&THE_STATE_COUNTER);
} }
// ======================================================================= //=================================================================================================
// function : InvalidateOrientation
// purpose :
// =======================================================================
void Graphic3d_Camera::InvalidateOrientation() void Graphic3d_Camera::InvalidateOrientation()
{ {
myMatricesD.ResetOrientation(); myMatricesD.ResetOrientation();
@ -1244,10 +1132,8 @@ void Graphic3d_Camera::InvalidateOrientation()
(Standard_Size)Standard_Atomic_Increment(&THE_STATE_COUNTER); (Standard_Size)Standard_Atomic_Increment(&THE_STATE_COUNTER);
} }
// ======================================================================= //=================================================================================================
// function : orthoProj
// purpose :
// =======================================================================
template <typename Elem_t> template <typename Elem_t>
void Graphic3d_Camera::orthoProj(NCollection_Mat4<Elem_t>& theOutMx, void Graphic3d_Camera::orthoProj(NCollection_Mat4<Elem_t>& theOutMx,
const Aspect_FrustumLRBT<Elem_t>& theLRBT, const Aspect_FrustumLRBT<Elem_t>& theLRBT,
@ -1287,10 +1173,8 @@ void Graphic3d_Camera::orthoProj(NCollection_Mat4<Elem_t>& theOutMx,
theOutMx.ChangeValue(3, 3) = Elem_t(1.0); theOutMx.ChangeValue(3, 3) = Elem_t(1.0);
} }
// ======================================================================= //=================================================================================================
// function : PerspectiveProj
// purpose :
// =======================================================================
template <typename Elem_t> template <typename Elem_t>
void Graphic3d_Camera::perspectiveProj(NCollection_Mat4<Elem_t>& theOutMx, void Graphic3d_Camera::perspectiveProj(NCollection_Mat4<Elem_t>& theOutMx,
const Aspect_FrustumLRBT<Elem_t>& theLRBT, const Aspect_FrustumLRBT<Elem_t>& theLRBT,
@ -1336,10 +1220,8 @@ void Graphic3d_Camera::perspectiveProj(NCollection_Mat4<Elem_t>& theOutM
theOutMx.ChangeValue(3, 3) = Elem_t(0.0); theOutMx.ChangeValue(3, 3) = Elem_t(0.0);
} }
// ======================================================================= //=================================================================================================
// function : StereoEyeProj
// purpose :
// =======================================================================
template <typename Elem_t> template <typename Elem_t>
void Graphic3d_Camera::stereoEyeProj(NCollection_Mat4<Elem_t>& theOutMx, void Graphic3d_Camera::stereoEyeProj(NCollection_Mat4<Elem_t>& theOutMx,
const Aspect_FrustumLRBT<Elem_t>& theLRBT, const Aspect_FrustumLRBT<Elem_t>& theLRBT,
@ -1359,10 +1241,8 @@ void Graphic3d_Camera::stereoEyeProj(NCollection_Mat4<Elem_t>& theOutMx,
perspectiveProj(theOutMx, aLRBT, theNear, theFar); perspectiveProj(theOutMx, aLRBT, theNear, theFar);
} }
// ======================================================================= //=================================================================================================
// function : LookOrientation
// purpose :
// =======================================================================
template <typename Elem_t> template <typename Elem_t>
void Graphic3d_Camera::LookOrientation(const NCollection_Vec3<Elem_t>& theEye, void Graphic3d_Camera::LookOrientation(const NCollection_Vec3<Elem_t>& theEye,
const NCollection_Vec3<Elem_t>& theFwdDir, const NCollection_Vec3<Elem_t>& theFwdDir,
@ -1397,10 +1277,8 @@ void Graphic3d_Camera::LookOrientation(const NCollection_Vec3<Elem_t>& theEye,
theOutMx.Multiply(anAxialScaleMx); theOutMx.Multiply(anAxialScaleMx);
} }
// ======================================================================= //=================================================================================================
// function : FitMinMax
// purpose :
// =======================================================================
bool Graphic3d_Camera::FitMinMax(const Bnd_Box& theBox, bool Graphic3d_Camera::FitMinMax(const Bnd_Box& theBox,
const Standard_Real theResolution, const Standard_Real theResolution,
const bool theToEnlargeIfLine) const bool theToEnlargeIfLine)

View File

@ -39,10 +39,8 @@ static Handle(Graphic3d_AspectFillArea3d) defaultAspect()
} }
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : Graphic3d_ClipPlane
// purpose :
// =======================================================================
Graphic3d_ClipPlane::Graphic3d_ClipPlane() Graphic3d_ClipPlane::Graphic3d_ClipPlane()
: myAspect(defaultAspect()), : myAspect(defaultAspect()),
myPrevInChain(NULL), myPrevInChain(NULL),
@ -59,10 +57,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane()
makeId(); makeId();
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_ClipPlane
// purpose :
// =======================================================================
Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_Vec4d& theEquation) Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_Vec4d& theEquation)
: myAspect(defaultAspect()), : myAspect(defaultAspect()),
myPrevInChain(NULL), myPrevInChain(NULL),
@ -80,10 +76,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_Vec4d& theEquation)
updateInversedPlane(); updateInversedPlane();
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_ClipPlane
// purpose :
// =======================================================================
Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_ClipPlane& theOther) Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_ClipPlane& theOther)
: Standard_Transient(theOther), : Standard_Transient(theOther),
myAspect(defaultAspect()), myAspect(defaultAspect()),
@ -102,10 +96,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_ClipPlane& theOther)
*myAspect = *theOther.CappingAspect(); *myAspect = *theOther.CappingAspect();
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_ClipPlane
// purpose :
// =======================================================================
Graphic3d_ClipPlane::Graphic3d_ClipPlane(const gp_Pln& thePlane) Graphic3d_ClipPlane::Graphic3d_ClipPlane(const gp_Pln& thePlane)
: myAspect(defaultAspect()), : myAspect(defaultAspect()),
myPrevInChain(NULL), myPrevInChain(NULL),
@ -122,10 +114,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const gp_Pln& thePlane)
makeId(); makeId();
} }
// ======================================================================= //=================================================================================================
// function : SetEquation
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetEquation(const Graphic3d_Vec4d& theEquation) void Graphic3d_ClipPlane::SetEquation(const Graphic3d_Vec4d& theEquation)
{ {
myPlane = gp_Pln(theEquation.x(), theEquation.y(), theEquation.z(), theEquation.w()); myPlane = gp_Pln(theEquation.x(), theEquation.y(), theEquation.z(), theEquation.w());
@ -134,10 +124,8 @@ void Graphic3d_ClipPlane::SetEquation(const Graphic3d_Vec4d& theEquation)
myEquationMod++; myEquationMod++;
} }
// ======================================================================= //=================================================================================================
// function : SetPlane
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetEquation(const gp_Pln& thePlane) void Graphic3d_ClipPlane::SetEquation(const gp_Pln& thePlane)
{ {
myPlane = thePlane; myPlane = thePlane;
@ -146,10 +134,8 @@ void Graphic3d_ClipPlane::SetEquation(const gp_Pln& thePlane)
myEquationMod++; myEquationMod++;
} }
// ======================================================================= //=================================================================================================
// function : SetOn
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetOn(const Standard_Boolean theIsOn) void Graphic3d_ClipPlane::SetOn(const Standard_Boolean theIsOn)
{ {
if (myPrevInChain != NULL) if (myPrevInChain != NULL)
@ -160,28 +146,22 @@ void Graphic3d_ClipPlane::SetOn(const Standard_Boolean theIsOn)
myIsOn = theIsOn; myIsOn = theIsOn;
} }
// ======================================================================= //=================================================================================================
// function : SetCapping
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCapping(const Standard_Boolean theIsOn) void Graphic3d_ClipPlane::SetCapping(const Standard_Boolean theIsOn)
{ {
myIsCapping = theIsOn; myIsCapping = theIsOn;
} }
// ======================================================================= //=================================================================================================
// function : Clone
// purpose :
// =======================================================================
Handle(Graphic3d_ClipPlane) Graphic3d_ClipPlane::Clone() const Handle(Graphic3d_ClipPlane) Graphic3d_ClipPlane::Clone() const
{ {
return new Graphic3d_ClipPlane(*this); return new Graphic3d_ClipPlane(*this);
} }
// ======================================================================= //=================================================================================================
// function : SetCappingColor
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingColor(const Quantity_Color& theColor) void Graphic3d_ClipPlane::SetCappingColor(const Quantity_Color& theColor)
{ {
myAspect->SetInteriorColor(theColor); myAspect->SetInteriorColor(theColor);
@ -189,10 +169,8 @@ void Graphic3d_ClipPlane::SetCappingColor(const Quantity_Color& theColor)
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : SetCappingMaterial
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingMaterial(const Graphic3d_MaterialAspect& theMat) void Graphic3d_ClipPlane::SetCappingMaterial(const Graphic3d_MaterialAspect& theMat)
{ {
myAspect->SetFrontMaterial(theMat); myAspect->SetFrontMaterial(theMat);
@ -203,10 +181,8 @@ void Graphic3d_ClipPlane::SetCappingMaterial(const Graphic3d_MaterialAspect& the
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : SetCappingTexture
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingTexture(const Handle(Graphic3d_TextureMap)& theTexture) void Graphic3d_ClipPlane::SetCappingTexture(const Handle(Graphic3d_TextureMap)& theTexture)
{ {
if (!theTexture.IsNull()) if (!theTexture.IsNull())
@ -231,60 +207,48 @@ void Graphic3d_ClipPlane::SetCappingTexture(const Handle(Graphic3d_TextureMap)&
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : SetCappingHatch
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingHatch(const Aspect_HatchStyle theStyle) void Graphic3d_ClipPlane::SetCappingHatch(const Aspect_HatchStyle theStyle)
{ {
myAspect->SetHatchStyle(theStyle); myAspect->SetHatchStyle(theStyle);
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : SetCappingCustomHatch
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingCustomHatch(const Handle(Graphic3d_HatchStyle)& theStyle) void Graphic3d_ClipPlane::SetCappingCustomHatch(const Handle(Graphic3d_HatchStyle)& theStyle)
{ {
myAspect->SetHatchStyle(theStyle); myAspect->SetHatchStyle(theStyle);
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : SetCappingHatchOn
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingHatchOn() void Graphic3d_ClipPlane::SetCappingHatchOn()
{ {
myAspect->SetInteriorStyle(Aspect_IS_HATCH); myAspect->SetInteriorStyle(Aspect_IS_HATCH);
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : SetCappingHatchOff
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingHatchOff() void Graphic3d_ClipPlane::SetCappingHatchOff()
{ {
myAspect->SetInteriorStyle(Aspect_IS_SOLID); myAspect->SetInteriorStyle(Aspect_IS_SOLID);
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : SetCappingAspect
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetCappingAspect(const Handle(Graphic3d_AspectFillArea3d)& theAspect) void Graphic3d_ClipPlane::SetCappingAspect(const Handle(Graphic3d_AspectFillArea3d)& theAspect)
{ {
myAspect = theAspect; myAspect = theAspect;
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : setCappingFlag
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::setCappingFlag(bool theToUse, int theFlag) void Graphic3d_ClipPlane::setCappingFlag(bool theToUse, int theFlag)
{ {
if (theToUse) if (theToUse)
@ -298,20 +262,16 @@ void Graphic3d_ClipPlane::setCappingFlag(bool theToUse, int theFlag)
++myAspectMod; ++myAspectMod;
} }
// ======================================================================= //=================================================================================================
// function : makeId
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::makeId() void Graphic3d_ClipPlane::makeId()
{ {
myId = TCollection_AsciiString("Graphic3d_ClipPlane_") // DynamicType()->Name() myId = TCollection_AsciiString("Graphic3d_ClipPlane_") // DynamicType()->Name()
+ TCollection_AsciiString(Standard_Atomic_Increment(&THE_CLIP_PLANE_COUNTER)); + TCollection_AsciiString(Standard_Atomic_Increment(&THE_CLIP_PLANE_COUNTER));
} }
// ======================================================================= //=================================================================================================
// function : updateChainLen
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::updateChainLen() void Graphic3d_ClipPlane::updateChainLen()
{ {
myChainLenFwd = !myNextInChain.IsNull() ? (myNextInChain->myChainLenFwd + 1) : 1; myChainLenFwd = !myNextInChain.IsNull() ? (myNextInChain->myChainLenFwd + 1) : 1;
@ -321,10 +281,8 @@ void Graphic3d_ClipPlane::updateChainLen()
} }
} }
// ======================================================================= //=================================================================================================
// function : SetChainNextPlane
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::SetChainNextPlane(const Handle(Graphic3d_ClipPlane)& thePlane) void Graphic3d_ClipPlane::SetChainNextPlane(const Handle(Graphic3d_ClipPlane)& thePlane)
{ {
++myEquationMod; ++myEquationMod;
@ -340,10 +298,8 @@ void Graphic3d_ClipPlane::SetChainNextPlane(const Handle(Graphic3d_ClipPlane)& t
updateChainLen(); updateChainLen();
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_ClipPlane::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const void Graphic3d_ClipPlane::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)

View File

@ -16,10 +16,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMap, Graphic3d_TextureMap) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMap, Graphic3d_TextureMap)
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMap
// purpose :
// =======================================================================
Graphic3d_CubeMap::Graphic3d_CubeMap(const TCollection_AsciiString& theFileName, Graphic3d_CubeMap::Graphic3d_CubeMap(const TCollection_AsciiString& theFileName,
Standard_Boolean theToGenerateMipmaps) Standard_Boolean theToGenerateMipmaps)
: Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_CUBEMAP), : Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_CUBEMAP),
@ -30,10 +28,8 @@ Graphic3d_CubeMap::Graphic3d_CubeMap(const TCollection_AsciiString& theFileName,
myHasMipmaps = theToGenerateMipmaps; myHasMipmaps = theToGenerateMipmaps;
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMap
// purpose :
// =======================================================================
Graphic3d_CubeMap::Graphic3d_CubeMap(const Handle(Image_PixMap)& thePixmap, Graphic3d_CubeMap::Graphic3d_CubeMap(const Handle(Image_PixMap)& thePixmap,
Standard_Boolean theToGenerateMipmaps) Standard_Boolean theToGenerateMipmaps)
: Graphic3d_TextureMap(thePixmap, Graphic3d_TypeOfTexture_CUBEMAP), : Graphic3d_TextureMap(thePixmap, Graphic3d_TypeOfTexture_CUBEMAP),
@ -44,10 +40,8 @@ Graphic3d_CubeMap::Graphic3d_CubeMap(const Handle(Image_PixMap)& thePixmap,
myHasMipmaps = theToGenerateMipmaps; myHasMipmaps = theToGenerateMipmaps;
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_CubeMap
// purpose :
// =======================================================================
Graphic3d_CubeMap::~Graphic3d_CubeMap() Graphic3d_CubeMap::~Graphic3d_CubeMap()
{ {
// //

View File

@ -18,20 +18,16 @@
#include <bitset> #include <bitset>
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMapOrder
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder() Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder()
: myConvolution(0), : myConvolution(0),
myHasOverflows(false) myHasOverflows(false)
{ {
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMapOrder
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(unsigned char thePosXLocation, Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(unsigned char thePosXLocation,
unsigned char theNegXLocation, unsigned char theNegXLocation,
unsigned char thePosYLocation, unsigned char thePosYLocation,
@ -49,20 +45,16 @@ Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(unsigned char thePosXLocation,
Set(Graphic3d_CMS_NEG_Z, theNegZLocation); Set(Graphic3d_CMS_NEG_Z, theNegZLocation);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMapOrder
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(const Graphic3d_ValidatedCubeMapOrder& theOrder) Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder(const Graphic3d_ValidatedCubeMapOrder& theOrder)
: myConvolution(theOrder.Order.myConvolution), : myConvolution(theOrder.Order.myConvolution),
myHasOverflows(theOrder.Order.myHasOverflows) myHasOverflows(theOrder.Order.myHasOverflows)
{ {
} }
// ======================================================================= //=================================================================================================
// function : Set
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(const Graphic3d_CubeMapOrder& theOrder) Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(const Graphic3d_CubeMapOrder& theOrder)
{ {
myConvolution = theOrder.myConvolution; myConvolution = theOrder.myConvolution;
@ -85,10 +77,8 @@ Graphic3d_ValidatedCubeMapOrder Graphic3d_CubeMapOrder::Validated() const
return *this; return *this;
} }
// ======================================================================= //=================================================================================================
// function : Set
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(Graphic3d_CubeMapSide theCubeMapSide, Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(Graphic3d_CubeMapSide theCubeMapSide,
unsigned char theValue) unsigned char theValue)
{ {
@ -101,10 +91,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set(Graphic3d_CubeMapSide theCub
return *this; return *this;
} }
// ======================================================================= //=================================================================================================
// function : Get
// purpose :
// =======================================================================
unsigned char Graphic3d_CubeMapOrder::Get(Graphic3d_CubeMapSide theCubeMapSide) const unsigned char Graphic3d_CubeMapOrder::Get(Graphic3d_CubeMapSide theCubeMapSide) const
{ {
return get(static_cast<unsigned char>(theCubeMapSide)); return get(static_cast<unsigned char>(theCubeMapSide));
@ -119,10 +107,8 @@ unsigned char Graphic3d_CubeMapOrder::operator[](Graphic3d_CubeMapSide theCubeMa
return Get(theCubeMapSide); return Get(theCubeMapSide);
} }
// ======================================================================= //=================================================================================================
// function : SetDefault
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault() Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault()
{ {
for (unsigned char i = 0; i < 6; ++i) for (unsigned char i = 0; i < 6; ++i)
@ -132,10 +118,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault()
return *this; return *this;
} }
// ======================================================================= //=================================================================================================
// function : Permute
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute( Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute(
const Graphic3d_ValidatedCubeMapOrder& thePermutation) const Graphic3d_ValidatedCubeMapOrder& thePermutation)
{ {
@ -147,10 +131,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute(
return *this; return *this;
} }
// ======================================================================= //=================================================================================================
// function : Permuted
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted( Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted(
const Graphic3d_ValidatedCubeMapOrder& thePermutation) const const Graphic3d_ValidatedCubeMapOrder& thePermutation) const
{ {
@ -159,10 +141,8 @@ Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted(
return anOrder; return anOrder;
} }
// ======================================================================= //=================================================================================================
// function : Swap
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Swap(Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Swap(Graphic3d_CubeMapSide theFirstSide,
Graphic3d_CubeMapSide theSecondSide) Graphic3d_CubeMapSide theSecondSide)
{ {
@ -172,10 +152,8 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Swap(Graphic3d_CubeMapSide theFi
return *this; return *this;
} }
// ======================================================================= //=================================================================================================
// function : Swapped
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Swapped(Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Swapped(Graphic3d_CubeMapSide theFirstSide,
Graphic3d_CubeMapSide theSecondSide) const Graphic3d_CubeMapSide theSecondSide) const
{ {
@ -184,10 +162,8 @@ Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Swapped(Graphic3d_CubeMapSide the
return anOrder; return anOrder;
} }
// ======================================================================= //=================================================================================================
// function : Clear
// purpose :
// =======================================================================
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Clear() Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Clear()
{ {
myConvolution = 0; myConvolution = 0;
@ -195,19 +171,15 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Clear()
return *this; return *this;
} }
// ======================================================================= //=================================================================================================
// function : IsEmpty
// purpose :
// =======================================================================
bool Graphic3d_CubeMapOrder::IsEmpty() const bool Graphic3d_CubeMapOrder::IsEmpty() const
{ {
return myConvolution == 0; return myConvolution == 0;
} }
// ======================================================================= //=================================================================================================
// function : HasRepetitions
// purpose :
// =======================================================================
bool Graphic3d_CubeMapOrder::HasRepetitions() const bool Graphic3d_CubeMapOrder::HasRepetitions() const
{ {
std::bitset<6> aBitSet; std::bitset<6> aBitSet;
@ -223,37 +195,29 @@ bool Graphic3d_CubeMapOrder::HasRepetitions() const
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : HasOverflows
// purpose :
// =======================================================================
bool Graphic3d_CubeMapOrder::HasOverflows() const bool Graphic3d_CubeMapOrder::HasOverflows() const
{ {
return myHasOverflows; return myHasOverflows;
} }
// ======================================================================= //=================================================================================================
// function : IsValid
// purpose :
// =======================================================================
bool Graphic3d_CubeMapOrder::IsValid() const bool Graphic3d_CubeMapOrder::IsValid() const
{ {
return !HasRepetitions() && !HasOverflows(); return !HasRepetitions() && !HasOverflows();
} }
// ======================================================================= //=================================================================================================
// function : get
// purpose :
// =======================================================================
unsigned char Graphic3d_CubeMapOrder::get(unsigned char theCubeMapSide) const unsigned char Graphic3d_CubeMapOrder::get(unsigned char theCubeMapSide) const
{ {
return (myConvolution / (1 << (theCubeMapSide * 3))) % (1 << 3); return (myConvolution / (1 << (theCubeMapSide * 3))) % (1 << 3);
} }
// ======================================================================= //=================================================================================================
// function : set
// purpose :
// =======================================================================
void Graphic3d_CubeMapOrder::set(unsigned char theCubeMapSide, unsigned char theValue) void Graphic3d_CubeMapOrder::set(unsigned char theCubeMapSide, unsigned char theValue)
{ {
unsigned int aValuePlace = 1 << (theCubeMapSide * 3); unsigned int aValuePlace = 1 << (theCubeMapSide * 3);
@ -261,19 +225,15 @@ void Graphic3d_CubeMapOrder::set(unsigned char theCubeMapSide, unsigned char the
myConvolution += aValuePlace * theValue; myConvolution += aValuePlace * theValue;
} }
// ======================================================================= //=================================================================================================
// function : set
// purpose :
// =======================================================================
void Graphic3d_CubeMapOrder::set(Graphic3d_CubeMapSide theCubeMapSide, unsigned char theValue) void Graphic3d_CubeMapOrder::set(Graphic3d_CubeMapSide theCubeMapSide, unsigned char theValue)
{ {
set(static_cast<unsigned char>(theCubeMapSide), theValue); set(static_cast<unsigned char>(theCubeMapSide), theValue);
} }
// ======================================================================= //=================================================================================================
// function : Default
// purpose :
// =======================================================================
const Graphic3d_ValidatedCubeMapOrder& Graphic3d_CubeMapOrder::Default() const Graphic3d_ValidatedCubeMapOrder& Graphic3d_CubeMapOrder::Default()
{ {
static const Graphic3d_ValidatedCubeMapOrder aCubeMapOrder = static const Graphic3d_ValidatedCubeMapOrder aCubeMapOrder =

View File

@ -19,10 +19,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapPacked, Graphic3d_CubeMap) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapPacked, Graphic3d_CubeMap)
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMapPacked
// purpose :
// =======================================================================
Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const TCollection_AsciiString& theFilePath, Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const TCollection_AsciiString& theFilePath,
const Graphic3d_ValidatedCubeMapOrder& theOrder) const Graphic3d_ValidatedCubeMapOrder& theOrder)
: Graphic3d_CubeMap(theFilePath), : Graphic3d_CubeMap(theFilePath),
@ -31,10 +29,8 @@ Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const TCollection_AsciiString&
{ {
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMapPacked
// purpose :
// =======================================================================
Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const Handle(Image_PixMap)& theImage, Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const Handle(Image_PixMap)& theImage,
const Graphic3d_ValidatedCubeMapOrder& theOrder) const Graphic3d_ValidatedCubeMapOrder& theOrder)
: Graphic3d_CubeMap(Handle(Image_PixMap)()), : Graphic3d_CubeMap(Handle(Image_PixMap)()),
@ -47,10 +43,8 @@ Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked(const Handle(Image_PixMap)&
} }
} }
// ======================================================================= //=================================================================================================
// function : CompressedValue
// purpose :
// =======================================================================
Handle(Image_CompressedPixMap) Graphic3d_CubeMapPacked::CompressedValue( Handle(Image_CompressedPixMap) Graphic3d_CubeMapPacked::CompressedValue(
const Handle(Image_SupportedFormats)& theSupported) const Handle(Image_SupportedFormats)& theSupported)
{ {
@ -75,10 +69,8 @@ Handle(Image_CompressedPixMap) Graphic3d_CubeMapPacked::CompressedValue(
return Handle(Image_CompressedPixMap)(); return Handle(Image_CompressedPixMap)();
} }
// ======================================================================= //=================================================================================================
// function : Value
// purpose :
// =======================================================================
Handle(Image_PixMap) Graphic3d_CubeMapPacked::Value( Handle(Image_PixMap) Graphic3d_CubeMapPacked::Value(
const Handle(Image_SupportedFormats)& theSupported) const Handle(Image_SupportedFormats)& theSupported)
{ {
@ -135,10 +127,8 @@ Handle(Image_PixMap) Graphic3d_CubeMapPacked::Value(
return Handle(Image_PixMap)(); return Handle(Image_PixMap)();
} }
// ======================================================================= //=================================================================================================
// function : checkOrder
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_CubeMapPacked::checkOrder( Standard_Boolean Graphic3d_CubeMapPacked::checkOrder(
const NCollection_Array1<unsigned int>& theOrder) const NCollection_Array1<unsigned int>& theOrder)
{ {
@ -177,10 +167,8 @@ Standard_Boolean Graphic3d_CubeMapPacked::checkOrder(
return anOrderIsValid; return anOrderIsValid;
} }
// ======================================================================= //=================================================================================================
// function : checkImage
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_CubeMapPacked::checkImage(const Handle(Image_PixMap)& theImage, Standard_Boolean Graphic3d_CubeMapPacked::checkImage(const Handle(Image_PixMap)& theImage,
unsigned int& theTileNumberX) unsigned int& theTileNumberX)
{ {
@ -211,10 +199,8 @@ Standard_Boolean Graphic3d_CubeMapPacked::checkImage(const Handle(Image_PixMap)&
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : tryLoadImage
// purpose :
// =======================================================================
void Graphic3d_CubeMapPacked::tryLoadImage(const Handle(Image_SupportedFormats)& theSupported, void Graphic3d_CubeMapPacked::tryLoadImage(const Handle(Image_SupportedFormats)& theSupported,
const TCollection_AsciiString& theFilePath) const TCollection_AsciiString& theFilePath)
{ {

View File

@ -22,10 +22,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapSeparate, Graphic3d_CubeMap) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapSeparate, Graphic3d_CubeMap)
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMapSeparate
// purpose :
// =======================================================================
Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate( Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate(
const NCollection_Array1<TCollection_AsciiString>& thePaths) const NCollection_Array1<TCollection_AsciiString>& thePaths)
{ {
@ -42,10 +40,8 @@ Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate(
} }
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_CubeMapSeparate
// purpose :
// =======================================================================
Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate( Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate(
const NCollection_Array1<Handle(Image_PixMap)>& theImages) const NCollection_Array1<Handle(Image_PixMap)>& theImages)
{ {
@ -87,10 +83,8 @@ Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate(
} }
} }
// ======================================================================= //=================================================================================================
// function : CompressedValue
// purpose :
// =======================================================================
Handle(Image_CompressedPixMap) Graphic3d_CubeMapSeparate::CompressedValue( Handle(Image_CompressedPixMap) Graphic3d_CubeMapSeparate::CompressedValue(
const Handle(Image_SupportedFormats)& theSupported) const Handle(Image_SupportedFormats)& theSupported)
{ {
@ -131,10 +125,8 @@ Handle(Image_CompressedPixMap) Graphic3d_CubeMapSeparate::CompressedValue(
return Handle(Image_CompressedPixMap)(); return Handle(Image_CompressedPixMap)();
} }
// ======================================================================= //=================================================================================================
// function : Value
// purpose :
// =======================================================================
Handle(Image_PixMap) Graphic3d_CubeMapSeparate::Value( Handle(Image_PixMap) Graphic3d_CubeMapSeparate::Value(
const Handle(Image_SupportedFormats)& theSupported) const Handle(Image_SupportedFormats)& theSupported)
{ {
@ -199,10 +191,8 @@ Handle(Image_PixMap) Graphic3d_CubeMapSeparate::Value(
return Handle(Image_PixMap)(); return Handle(Image_PixMap)();
} }
// ======================================================================= //=================================================================================================
// function : IsDone
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_CubeMapSeparate::IsDone() const Standard_Boolean Graphic3d_CubeMapSeparate::IsDone() const
{ {
if (!myImages[0].IsNull()) if (!myImages[0].IsNull())
@ -222,10 +212,8 @@ Standard_Boolean Graphic3d_CubeMapSeparate::IsDone() const
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : resetImages
// purpose :
// =======================================================================
void Graphic3d_CubeMapSeparate::resetImages() void Graphic3d_CubeMapSeparate::resetImages()
{ {
for (unsigned int i = 0; i < 6; ++i) for (unsigned int i = 0; i < 6; ++i)

View File

@ -19,10 +19,8 @@
#include <limits> #include <limits>
// ======================================================================= //=================================================================================================
// function : Graphic3d_CullingTool
// purpose :
// =======================================================================
Graphic3d_CullingTool::Graphic3d_CullingTool() Graphic3d_CullingTool::Graphic3d_CullingTool()
: myClipVerts(0, Graphic3d_Camera::FrustumVerticesNB), : myClipVerts(0, Graphic3d_Camera::FrustumVerticesNB),
myIsProjectionParallel(Standard_True), myIsProjectionParallel(Standard_True),
@ -32,10 +30,8 @@ Graphic3d_CullingTool::Graphic3d_CullingTool()
// //
} }
// ======================================================================= //=================================================================================================
// function : SetViewVolume
// purpose :
// =======================================================================
void Graphic3d_CullingTool::SetViewVolume(const Handle(Graphic3d_Camera)& theCamera, void Graphic3d_CullingTool::SetViewVolume(const Handle(Graphic3d_Camera)& theCamera,
const Graphic3d_Mat4d& theModelWorld) const Graphic3d_Mat4d& theModelWorld)
{ {
@ -102,10 +98,8 @@ void Graphic3d_CullingTool::SetViewVolume(const Handle(Graphic3d_Camera)& theCam
} }
} }
// ======================================================================= //=================================================================================================
// function : SetViewportSize
// purpose :
// =======================================================================
void Graphic3d_CullingTool::SetViewportSize(Standard_Integer theViewportWidth, void Graphic3d_CullingTool::SetViewportSize(Standard_Integer theViewportWidth,
Standard_Integer theViewportHeight, Standard_Integer theViewportHeight,
Standard_Real theResolutionRatio) Standard_Real theResolutionRatio)
@ -115,10 +109,8 @@ void Graphic3d_CullingTool::SetViewportSize(Standard_Integer theViewportWidth,
myPixelSize = Max(theResolutionRatio / myViewportHeight, theResolutionRatio / myViewportWidth); myPixelSize = Max(theResolutionRatio / myViewportHeight, theResolutionRatio / myViewportWidth);
} }
// ======================================================================= //=================================================================================================
// function : SignedPlanePointDistance
// purpose :
// =======================================================================
Standard_Real Graphic3d_CullingTool::SignedPlanePointDistance(const Graphic3d_Vec4d& theNormal, Standard_Real Graphic3d_CullingTool::SignedPlanePointDistance(const Graphic3d_Vec4d& theNormal,
const Graphic3d_Vec4d& thePnt) const Graphic3d_Vec4d& thePnt)
{ {
@ -136,10 +128,8 @@ Standard_Real Graphic3d_CullingTool::SignedPlanePointDistance(const Graphic3d_Ve
return aD + (anA * thePnt.x() + aB * thePnt.y() + aC * thePnt.z()); return aD + (anA * thePnt.x() + aB * thePnt.y() + aC * thePnt.z());
} }
// ======================================================================= //=================================================================================================
// function : SetCullingDistance
// purpose :
// =======================================================================
void Graphic3d_CullingTool::SetCullingDistance(CullingContext& theCtx, void Graphic3d_CullingTool::SetCullingDistance(CullingContext& theCtx,
Standard_Real theDistance) const Standard_Real theDistance) const
{ {
@ -150,10 +140,8 @@ void Graphic3d_CullingTool::SetCullingDistance(CullingContext& theCtx,
} }
} }
// ======================================================================= //=================================================================================================
// function : SetCullingSize
// purpose :
// =======================================================================
void Graphic3d_CullingTool::SetCullingSize(CullingContext& theCtx, Standard_Real theSize) const void Graphic3d_CullingTool::SetCullingSize(CullingContext& theCtx, Standard_Real theSize) const
{ {
theCtx.SizeCull2 = -1.0; theCtx.SizeCull2 = -1.0;
@ -165,10 +153,8 @@ void Graphic3d_CullingTool::SetCullingSize(CullingContext& theCtx, Standard_Real
} }
} }
// ======================================================================= //=================================================================================================
// function : CacheClipPtsProjections
// purpose :
// =======================================================================
void Graphic3d_CullingTool::CacheClipPtsProjections() void Graphic3d_CullingTool::CacheClipPtsProjections()
{ {
// project frustum onto its own normals // project frustum onto its own normals

View File

@ -237,10 +237,8 @@ static void addTimeInfo(TColStd_IndexedDataMapOfStringString& theDict,
} }
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : Graphic3d_FrameStats
// purpose :
// =======================================================================
Graphic3d_FrameStats::Graphic3d_FrameStats() Graphic3d_FrameStats::Graphic3d_FrameStats()
: myFpsTimer(Standard_True), : myFpsTimer(Standard_True),
myFrameStartTime(0.0), myFrameStartTime(0.0),
@ -254,19 +252,15 @@ Graphic3d_FrameStats::Graphic3d_FrameStats()
// //
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_FrameStats
// purpose :
// =======================================================================
Graphic3d_FrameStats::~Graphic3d_FrameStats() Graphic3d_FrameStats::~Graphic3d_FrameStats()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : FormatStats
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_FrameStats::FormatStats( TCollection_AsciiString Graphic3d_FrameStats::FormatStats(
Graphic3d_RenderingParams::PerfCounters theFlags) const Graphic3d_RenderingParams::PerfCounters theFlags) const
{ {
@ -558,10 +552,8 @@ TCollection_AsciiString Graphic3d_FrameStats::FormatStats(
return TCollection_AsciiString(aBuf.str().c_str()); return TCollection_AsciiString(aBuf.str().c_str());
} }
// ======================================================================= //=================================================================================================
// function : FormatStats
// purpose :
// =======================================================================
void Graphic3d_FrameStats::FormatStats(TColStd_IndexedDataMapOfStringString& theDict, void Graphic3d_FrameStats::FormatStats(TColStd_IndexedDataMapOfStringString& theDict,
Graphic3d_RenderingParams::PerfCounters theFlags) const Graphic3d_RenderingParams::PerfCounters theFlags) const
{ {
@ -676,10 +668,8 @@ void Graphic3d_FrameStats::FormatStats(TColStd_IndexedDataMapOfStringString& t
} }
} }
// ======================================================================= //=================================================================================================
// function : FrameStart
// purpose :
// =======================================================================
void Graphic3d_FrameStats::FrameStart(const Handle(Graphic3d_CView)& theView, void Graphic3d_FrameStats::FrameStart(const Handle(Graphic3d_CView)& theView,
bool theIsImmediateOnly) bool theIsImmediateOnly)
{ {
@ -713,10 +703,8 @@ void Graphic3d_FrameStats::FrameStart(const Handle(Graphic3d_CView)& theView,
} }
} }
// ======================================================================= //=================================================================================================
// function : FrameEnd
// purpose :
// =======================================================================
void Graphic3d_FrameStats::FrameEnd(const Handle(Graphic3d_CView)& theView, bool theIsImmediateOnly) void Graphic3d_FrameStats::FrameEnd(const Handle(Graphic3d_CView)& theView, bool theIsImmediateOnly)
{ {
const Graphic3d_RenderingParams::PerfCounters aBits = const Graphic3d_RenderingParams::PerfCounters aBits =

View File

@ -13,10 +13,8 @@
#include <Graphic3d_FrameStatsData.hxx> #include <Graphic3d_FrameStatsData.hxx>
// ======================================================================= //=================================================================================================
// function : Graphic3d_FrameStatsData
// purpose :
// =======================================================================
Graphic3d_FrameStatsData::Graphic3d_FrameStatsData() Graphic3d_FrameStatsData::Graphic3d_FrameStatsData()
: myFps(-1.0), : myFps(-1.0),
myFpsCpu(-1.0), myFpsCpu(-1.0),
@ -30,10 +28,8 @@ Graphic3d_FrameStatsData::Graphic3d_FrameStatsData()
Reset(); Reset();
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_FrameStatsData
// purpose :
// =======================================================================
Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(const Graphic3d_FrameStatsData& theOther) Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(const Graphic3d_FrameStatsData& theOther)
: myCounters(theOther.myCounters), : myCounters(theOther.myCounters),
myTimers(theOther.myTimers), myTimers(theOther.myTimers),
@ -46,10 +42,8 @@ Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(const Graphic3d_FrameStatsDat
{ {
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_FrameStatsData
// purpose :
// =======================================================================
Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(Graphic3d_FrameStatsData&& theOther) noexcept Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(Graphic3d_FrameStatsData&& theOther) noexcept
: myCounters(std::move(theOther.myCounters)), : myCounters(std::move(theOther.myCounters)),
myTimers(std::move(theOther.myTimers)), myTimers(std::move(theOther.myTimers)),
@ -106,10 +100,8 @@ Graphic3d_FrameStatsData& Graphic3d_FrameStatsData::operator=(
return *this; return *this;
} }
// ======================================================================= //=================================================================================================
// function : Reset
// purpose :
// =======================================================================
void Graphic3d_FrameStatsData::Reset() void Graphic3d_FrameStatsData::Reset()
{ {
myFps = -1.0; myFps = -1.0;
@ -122,10 +114,8 @@ void Graphic3d_FrameStatsData::Reset()
myTimersMax.assign(myTimersMax.size(), 0.0); myTimersMax.assign(myTimersMax.size(), 0.0);
} }
// ======================================================================= //=================================================================================================
// function : FillMax
// purpose :
// =======================================================================
void Graphic3d_FrameStatsData::FillMax(const Graphic3d_FrameStatsData& theOther) void Graphic3d_FrameStatsData::FillMax(const Graphic3d_FrameStatsData& theOther)
{ {
myFps = Max(myFps, theOther.myFps); myFps = Max(myFps, theOther.myFps);
@ -146,20 +136,16 @@ void Graphic3d_FrameStatsData::FillMax(const Graphic3d_FrameStatsData& theOther)
} }
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_FrameStatsDataTmp
// purpose :
// =======================================================================
Graphic3d_FrameStatsDataTmp::Graphic3d_FrameStatsDataTmp() Graphic3d_FrameStatsDataTmp::Graphic3d_FrameStatsDataTmp()
{ {
myOsdTimers.resize(Graphic3d_FrameStatsTimer_NB, OSD_Timer(true)); myOsdTimers.resize(Graphic3d_FrameStatsTimer_NB, OSD_Timer(true));
myTimersPrev.resize(Graphic3d_FrameStatsTimer_NB, 0.0); myTimersPrev.resize(Graphic3d_FrameStatsTimer_NB, 0.0);
} }
// ======================================================================= //=================================================================================================
// function : FlushTimers
// purpose :
// =======================================================================
void Graphic3d_FrameStatsDataTmp::FlushTimers(Standard_Size theNbFrames, bool theIsFinal) void Graphic3d_FrameStatsDataTmp::FlushTimers(Standard_Size theNbFrames, bool theIsFinal)
{ {
for (size_t aTimerIter = 0; aTimerIter < myTimers.size(); ++aTimerIter) for (size_t aTimerIter = 0; aTimerIter < myTimers.size(); ++aTimerIter)
@ -180,10 +166,8 @@ void Graphic3d_FrameStatsDataTmp::FlushTimers(Standard_Size theNbFrames, bool th
} }
} }
// ======================================================================= //=================================================================================================
// function : Reset
// purpose :
// =======================================================================
void Graphic3d_FrameStatsDataTmp::Reset() void Graphic3d_FrameStatsDataTmp::Reset()
{ {
Graphic3d_FrameStatsData::Reset(); Graphic3d_FrameStatsData::Reset();

View File

@ -20,10 +20,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_GraphicDriver, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_GraphicDriver, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_GraphicDriver
// purpose :
// =======================================================================
Graphic3d_GraphicDriver::Graphic3d_GraphicDriver(const Handle(Aspect_DisplayConnection)& theDisp) Graphic3d_GraphicDriver::Graphic3d_GraphicDriver(const Handle(Aspect_DisplayConnection)& theDisp)
: myDisplayConnection(theDisp) : myDisplayConnection(theDisp)
{ {
@ -114,28 +112,22 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver(const Handle(Aspect_DisplayConn
} }
} }
// ======================================================================= //=================================================================================================
// function : GetDisplayConnection
// purpose :
// =======================================================================
const Handle(Aspect_DisplayConnection)& Graphic3d_GraphicDriver::GetDisplayConnection() const const Handle(Aspect_DisplayConnection)& Graphic3d_GraphicDriver::GetDisplayConnection() const
{ {
return myDisplayConnection; return myDisplayConnection;
} }
// ======================================================================= //=================================================================================================
// function : NewIdentification
// purpose :
// =======================================================================
Standard_Integer Graphic3d_GraphicDriver::NewIdentification() Standard_Integer Graphic3d_GraphicDriver::NewIdentification()
{ {
return myStructGenId.Next(); return myStructGenId.Next();
} }
// ======================================================================= //=================================================================================================
// function : RemoveIdentification
// purpose :
// =======================================================================
void Graphic3d_GraphicDriver::RemoveIdentification(const Standard_Integer theId) void Graphic3d_GraphicDriver::RemoveIdentification(const Standard_Integer theId)
{ {
myStructGenId.Free(theId); myStructGenId.Free(theId);
@ -288,10 +280,8 @@ void Graphic3d_GraphicDriver::SetZLayerSettings(const Graphic3d_ZLayerId
aLayerDef->SetLayerSettings(theSettings); aLayerDef->SetLayerSettings(theSettings);
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_GraphicDriver::DumpJson(Standard_OStream& theOStream, void Graphic3d_GraphicDriver::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {

View File

@ -26,19 +26,15 @@ static Graphic3d_GraphicDriverFactoryList& getDriverFactories()
} }
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : DriverFactories
// purpose :
// =======================================================================
const Graphic3d_GraphicDriverFactoryList& Graphic3d_GraphicDriverFactory::DriverFactories() const Graphic3d_GraphicDriverFactoryList& Graphic3d_GraphicDriverFactory::DriverFactories()
{ {
return getDriverFactories(); return getDriverFactories();
} }
// ======================================================================= //=================================================================================================
// function : RegisterFactory
// purpose :
// =======================================================================
void Graphic3d_GraphicDriverFactory::RegisterFactory( void Graphic3d_GraphicDriverFactory::RegisterFactory(
const Handle(Graphic3d_GraphicDriverFactory)& theFactory, const Handle(Graphic3d_GraphicDriverFactory)& theFactory,
bool theIsPreferred) bool theIsPreferred)
@ -63,10 +59,8 @@ void Graphic3d_GraphicDriverFactory::RegisterFactory(
aFactories.Append(theFactory); aFactories.Append(theFactory);
} }
// ======================================================================= //=================================================================================================
// function : UnregisterFactory
// purpose :
// =======================================================================
void Graphic3d_GraphicDriverFactory::UnregisterFactory(const TCollection_AsciiString& theName) void Graphic3d_GraphicDriverFactory::UnregisterFactory(const TCollection_AsciiString& theName)
{ {
Graphic3d_GraphicDriverFactoryList& aFactories = getDriverFactories(); Graphic3d_GraphicDriverFactoryList& aFactories = getDriverFactories();
@ -83,20 +77,16 @@ void Graphic3d_GraphicDriverFactory::UnregisterFactory(const TCollection_AsciiSt
} }
} }
// ======================================================================= //=================================================================================================
// function : DefaultDriverFactory
// purpose :
// =======================================================================
Handle(Graphic3d_GraphicDriverFactory) Graphic3d_GraphicDriverFactory::DefaultDriverFactory() Handle(Graphic3d_GraphicDriverFactory) Graphic3d_GraphicDriverFactory::DefaultDriverFactory()
{ {
const Graphic3d_GraphicDriverFactoryList& aMap = getDriverFactories(); const Graphic3d_GraphicDriverFactoryList& aMap = getDriverFactories();
return !aMap.IsEmpty() ? aMap.First() : Handle(Graphic3d_GraphicDriverFactory)(); return !aMap.IsEmpty() ? aMap.First() : Handle(Graphic3d_GraphicDriverFactory)();
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_GraphicDriverFactory
// purpose :
// =======================================================================
Graphic3d_GraphicDriverFactory::Graphic3d_GraphicDriverFactory( Graphic3d_GraphicDriverFactory::Graphic3d_GraphicDriverFactory(
const TCollection_AsciiString& theName) const TCollection_AsciiString& theName)
: myName(theName) : myName(theName)

View File

@ -30,10 +30,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Group, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Group, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Group
// purpose :
// =======================================================================
Graphic3d_Group::Graphic3d_Group(const Handle(Graphic3d_Structure)& theStruct) Graphic3d_Group::Graphic3d_Group(const Handle(Graphic3d_Structure)& theStruct)
: myStructure(theStruct.operator->()), : myStructure(theStruct.operator->()),
myIsClosed(false) myIsClosed(false)
@ -41,20 +39,16 @@ Graphic3d_Group::Graphic3d_Group(const Handle(Graphic3d_Structure)& theStruct)
// //
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_Group
// purpose :
// =======================================================================
Graphic3d_Group::~Graphic3d_Group() Graphic3d_Group::~Graphic3d_Group()
{ {
// tell graphics driver to clear internal resources of the group // tell graphics driver to clear internal resources of the group
Clear(Standard_False); Clear(Standard_False);
} }
// ======================================================================= //=================================================================================================
// function : Clear
// purpose :
// =======================================================================
void Graphic3d_Group::Clear(Standard_Boolean theUpdateStructureMgr) void Graphic3d_Group::Clear(Standard_Boolean theUpdateStructureMgr)
{ {
if (IsDeleted()) if (IsDeleted())
@ -73,10 +67,8 @@ void Graphic3d_Group::Clear(Standard_Boolean theUpdateStructureMgr)
} }
} }
// ======================================================================= //=================================================================================================
// function : Remove
// purpose :
// =======================================================================
void Graphic3d_Group::Remove() void Graphic3d_Group::Remove()
{ {
if (IsDeleted()) if (IsDeleted())
@ -91,19 +83,15 @@ void Graphic3d_Group::Remove()
myBounds.Clear(); myBounds.Clear();
} }
// ======================================================================= //=================================================================================================
// function : IsDeleted
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_Group::IsDeleted() const Standard_Boolean Graphic3d_Group::IsDeleted() const
{ {
return myStructure == NULL || myStructure->IsDeleted(); return myStructure == NULL || myStructure->IsDeleted();
} }
// ======================================================================= //=================================================================================================
// function : IsEmpty
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_Group::IsEmpty() const Standard_Boolean Graphic3d_Group::IsEmpty() const
{ {
if (IsDeleted()) if (IsDeleted())
@ -114,10 +102,8 @@ Standard_Boolean Graphic3d_Group::IsEmpty() const
return !myStructure->IsInfinite() && !myBounds.IsValid(); return !myStructure->IsInfinite() && !myBounds.IsValid();
} }
// ======================================================================= //=================================================================================================
// function : SetTransformPersistence
// purpose :
// =======================================================================
void Graphic3d_Group::SetTransformPersistence(const Handle(Graphic3d_TransformPers)& theTrsfPers) void Graphic3d_Group::SetTransformPersistence(const Handle(Graphic3d_TransformPers)& theTrsfPers)
{ {
if (myTrsfPers != theTrsfPers) if (myTrsfPers != theTrsfPers)
@ -130,10 +116,8 @@ void Graphic3d_Group::SetTransformPersistence(const Handle(Graphic3d_TransformPe
} }
} }
// ======================================================================= //=================================================================================================
// function : SetMinMaxValues
// purpose :
// =======================================================================
void Graphic3d_Group::SetMinMaxValues(const Standard_Real theXMin, void Graphic3d_Group::SetMinMaxValues(const Standard_Real theXMin,
const Standard_Real theYMin, const Standard_Real theYMin,
const Standard_Real theZMin, const Standard_Real theZMin,
@ -151,19 +135,15 @@ void Graphic3d_Group::SetMinMaxValues(const Standard_Real theXMin,
1.0f)); 1.0f));
} }
// ======================================================================= //=================================================================================================
// function : Structure
// purpose :
// =======================================================================
Handle(Graphic3d_Structure) Graphic3d_Group::Structure() const Handle(Graphic3d_Structure) Graphic3d_Group::Structure() const
{ {
return myStructure; return myStructure;
} }
// ======================================================================= //=================================================================================================
// function : MinMaxValues
// purpose :
// =======================================================================
void Graphic3d_Group::MinMaxValues(Standard_Real& theXMin, void Graphic3d_Group::MinMaxValues(Standard_Real& theXMin,
Standard_Real& theYMin, Standard_Real& theYMin,
Standard_Real& theZMin, Standard_Real& theZMin,
@ -196,10 +176,8 @@ void Graphic3d_Group::MinMaxValues(Standard_Real& theXMin,
} }
} }
// ======================================================================= //=================================================================================================
// function : Update
// purpose :
// =======================================================================
void Graphic3d_Group::Update() const void Graphic3d_Group::Update() const
{ {
if (IsDeleted()) if (IsDeleted())
@ -210,10 +188,8 @@ void Graphic3d_Group::Update() const
myStructure->StructureManager()->Update(); myStructure->StructureManager()->Update();
} }
// ======================================================================= //=================================================================================================
// function : AddPrimitiveArray
// purpose :
// =======================================================================
void Graphic3d_Group::AddPrimitiveArray(const Handle(Graphic3d_ArrayOfPrimitives)& thePrim, void Graphic3d_Group::AddPrimitiveArray(const Handle(Graphic3d_ArrayOfPrimitives)& thePrim,
const Standard_Boolean theToEvalMinMax) const Standard_Boolean theToEvalMinMax)
{ {
@ -229,10 +205,8 @@ void Graphic3d_Group::AddPrimitiveArray(const Handle(Graphic3d_ArrayOfPrimitives
theToEvalMinMax); theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : AddPrimitiveArray
// purpose :
// =======================================================================
void Graphic3d_Group::AddPrimitiveArray(const Graphic3d_TypeOfPrimitiveArray theType, void Graphic3d_Group::AddPrimitiveArray(const Graphic3d_TypeOfPrimitiveArray theType,
const Handle(Graphic3d_IndexBuffer)&, const Handle(Graphic3d_IndexBuffer)&,
const Handle(Graphic3d_Buffer)& theAttribs, const Handle(Graphic3d_Buffer)& theAttribs,
@ -289,10 +263,8 @@ void Graphic3d_Group::AddPrimitiveArray(const Graphic3d_TypeOfPrimitiveArray the
Update(); Update();
} }
// ======================================================================= //=================================================================================================
// function : Marker
// purpose :
// =======================================================================
void Graphic3d_Group::Marker(const Graphic3d_Vertex& thePoint, void Graphic3d_Group::Marker(const Graphic3d_Vertex& thePoint,
const Standard_Boolean theToEvalMinMax) const Standard_Boolean theToEvalMinMax)
{ {
@ -301,10 +273,8 @@ void Graphic3d_Group::Marker(const Graphic3d_Vertex& thePoint,
AddPrimitiveArray(aPoints, theToEvalMinMax); AddPrimitiveArray(aPoints, theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : Text
// purpose :
// =======================================================================
void Graphic3d_Group::Text(const Standard_CString theText, void Graphic3d_Group::Text(const Standard_CString theText,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real theHeight, const Standard_Real theHeight,
@ -322,10 +292,8 @@ void Graphic3d_Group::Text(const Standard_CString theText,
AddText(aText, theToEvalMinMax); AddText(aText, theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : Text
// purpose :
// =======================================================================
void Graphic3d_Group::Text(const Standard_CString theText, void Graphic3d_Group::Text(const Standard_CString theText,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real theHeight, const Standard_Real theHeight,
@ -337,10 +305,8 @@ void Graphic3d_Group::Text(const Standard_CString theText,
AddText(aText, theToEvalMinMax); AddText(aText, theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : Text
// purpose :
// =======================================================================
void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, void Graphic3d_Group::Text(const TCollection_ExtendedString& theText,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real theHeight, const Standard_Real theHeight,
@ -358,10 +324,8 @@ void Graphic3d_Group::Text(const TCollection_ExtendedString& theText,
AddText(aText, theToEvalMinMax); AddText(aText, theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : Text
// purpose :
// =======================================================================
void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, void Graphic3d_Group::Text(const TCollection_ExtendedString& theText,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real theHeight, const Standard_Real theHeight,
@ -381,10 +345,8 @@ void Graphic3d_Group::Text(const TCollection_ExtendedString& theText,
AddText(aText, theToEvalMinMax); AddText(aText, theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : Text
// purpose :
// =======================================================================
void Graphic3d_Group::Text(const Standard_CString theText, void Graphic3d_Group::Text(const Standard_CString theText,
const gp_Ax2& theOrientation, const gp_Ax2& theOrientation,
const Standard_Real theHeight, const Standard_Real theHeight,
@ -404,10 +366,8 @@ void Graphic3d_Group::Text(const Standard_CString theText,
AddText(aText, theToEvalMinMax); AddText(aText, theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : Text
// purpose :
// =======================================================================
void Graphic3d_Group::Text(const TCollection_ExtendedString& theText, void Graphic3d_Group::Text(const TCollection_ExtendedString& theText,
const Graphic3d_Vertex& thePoint, const Graphic3d_Vertex& thePoint,
const Standard_Real theHeight, const Standard_Real theHeight,
@ -419,10 +379,8 @@ void Graphic3d_Group::Text(const TCollection_ExtendedString& theText,
AddText(aText, theToEvalMinMax); AddText(aText, theToEvalMinMax);
} }
// ======================================================================= //=================================================================================================
// function : AddText
// purpose :
// =======================================================================
void Graphic3d_Group::AddText(const Handle(Graphic3d_Text)& theTextParams, void Graphic3d_Group::AddText(const Handle(Graphic3d_Text)& theTextParams,
const Standard_Boolean theToEvalMinMax) const Standard_Boolean theToEvalMinMax)
{ {
@ -445,10 +403,8 @@ void Graphic3d_Group::AddText(const Handle(Graphic3d_Text)& theTextParams,
Update(); Update();
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_Group::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const void Graphic3d_Group::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)

View File

@ -18,10 +18,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Layer, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Layer, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Layer
// purpose :
// =======================================================================
Graphic3d_Layer::Graphic3d_Layer(Graphic3d_ZLayerId theId, const Handle(BVH_Builder3d)& theBuilder) Graphic3d_Layer::Graphic3d_Layer(Graphic3d_ZLayerId theId, const Handle(BVH_Builder3d)& theBuilder)
: myNbStructures(0), : myNbStructures(0),
myNbStructuresNotCulled(0), myNbStructuresNotCulled(0),
@ -33,19 +31,15 @@ Graphic3d_Layer::Graphic3d_Layer(Graphic3d_ZLayerId theId, const Handle(BVH_Buil
myIsBoundingBoxNeedsReset[0] = myIsBoundingBoxNeedsReset[1] = true; myIsBoundingBoxNeedsReset[0] = myIsBoundingBoxNeedsReset[1] = true;
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_Layer
// purpose :
// =======================================================================
Graphic3d_Layer::~Graphic3d_Layer() Graphic3d_Layer::~Graphic3d_Layer()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : Add
// purpose :
// =======================================================================
void Graphic3d_Layer::Add(const Graphic3d_CStructure* theStruct, void Graphic3d_Layer::Add(const Graphic3d_CStructure* theStruct,
Graphic3d_DisplayPriority thePriority, Graphic3d_DisplayPriority thePriority,
Standard_Boolean isForChangePriority) Standard_Boolean isForChangePriority)
@ -80,10 +74,8 @@ void Graphic3d_Layer::Add(const Graphic3d_CStructure* theStruct,
++myNbStructures; ++myNbStructures;
} }
// ======================================================================= //=================================================================================================
// function : Remove
// purpose :
// =======================================================================
bool Graphic3d_Layer::Remove(const Graphic3d_CStructure* theStruct, bool Graphic3d_Layer::Remove(const Graphic3d_CStructure* theStruct,
Graphic3d_DisplayPriority& thePriority, Graphic3d_DisplayPriority& thePriority,
Standard_Boolean isForChangePriority) Standard_Boolean isForChangePriority)
@ -140,10 +132,8 @@ bool Graphic3d_Layer::Remove(const Graphic3d_CStructure* theStruct,
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : InvalidateBVHData
// purpose :
// =======================================================================
void Graphic3d_Layer::InvalidateBVHData() void Graphic3d_Layer::InvalidateBVHData()
{ {
myIsBVHPrimitivesNeedsReset = Standard_True; myIsBVHPrimitivesNeedsReset = Standard_True;
@ -181,10 +171,8 @@ static void addBox3dToBndBox(Bnd_Box& theResBox, const Graphic3d_BndBox3d& theBo
} }
} }
// ======================================================================= //=================================================================================================
// function : BoundingBox
// purpose :
// =======================================================================
Bnd_Box Graphic3d_Layer::BoundingBox(Standard_Integer theViewId, Bnd_Box Graphic3d_Layer::BoundingBox(Standard_Integer theViewId,
const Handle(Graphic3d_Camera)& theCamera, const Handle(Graphic3d_Camera)& theCamera,
Standard_Integer theWindowWidth, Standard_Integer theWindowWidth,
@ -339,10 +327,8 @@ Bnd_Box Graphic3d_Layer::BoundingBox(Standard_Integer theViewId,
return aResBox; return aResBox;
} }
// ======================================================================= //=================================================================================================
// function : considerZoomPersistenceObjects
// purpose :
// =======================================================================
Standard_Real Graphic3d_Layer::considerZoomPersistenceObjects( Standard_Real Graphic3d_Layer::considerZoomPersistenceObjects(
Standard_Integer theViewId, Standard_Integer theViewId,
const Handle(Graphic3d_Camera)& theCamera, const Handle(Graphic3d_Camera)& theCamera,
@ -477,10 +463,8 @@ Standard_Real Graphic3d_Layer::considerZoomPersistenceObjects(
return (aMaxCoef > 0.0) ? aMaxCoef : 1.0; return (aMaxCoef > 0.0) ? aMaxCoef : 1.0;
} }
// ======================================================================= //=================================================================================================
// function : updateBVH
// purpose :
// =======================================================================
void Graphic3d_Layer::updateBVH() const void Graphic3d_Layer::updateBVH() const
{ {
if (!myIsBVHPrimitivesNeedsReset) if (!myIsBVHPrimitivesNeedsReset)
@ -534,10 +518,8 @@ struct NodeInStack
}; };
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : UpdateCulling
// purpose :
// =======================================================================
void Graphic3d_Layer::UpdateCulling( void Graphic3d_Layer::UpdateCulling(
Standard_Integer theViewId, Standard_Integer theViewId,
const Graphic3d_CullingTool& theSelector, const Graphic3d_CullingTool& theSelector,
@ -706,10 +688,8 @@ void Graphic3d_Layer::UpdateCulling(
} }
} }
// ======================================================================= //=================================================================================================
// function : Append
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_Layer::Append(const Graphic3d_Layer& theOther) Standard_Boolean Graphic3d_Layer::Append(const Graphic3d_Layer& theOther)
{ {
// add all structures to destination priority list // add all structures to destination priority list
@ -754,10 +734,8 @@ void Graphic3d_Layer::SetLayerSettings(const Graphic3d_ZLayerSettings& theSettin
} }
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_Layer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const void Graphic3d_Layer::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)

View File

@ -28,10 +28,8 @@ static const char THE_LIGHT_KEY_LETTERS[Graphic3d_TypeOfLightSource_NB] = {
}; };
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : Graphic3d_LightSet
// purpose :
// =======================================================================
Graphic3d_LightSet::Graphic3d_LightSet() Graphic3d_LightSet::Graphic3d_LightSet()
: myAmbient(0.0f, 0.0f, 0.0f, 0.0f), : myAmbient(0.0f, 0.0f, 0.0f, 0.0f),
myNbEnabled(0), myNbEnabled(0),
@ -43,10 +41,8 @@ Graphic3d_LightSet::Graphic3d_LightSet()
memset(myLightTypesEnabled, 0, sizeof(myLightTypesEnabled)); memset(myLightTypesEnabled, 0, sizeof(myLightTypesEnabled));
} }
// ======================================================================= //=================================================================================================
// function : Add
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_LightSet::Add(const Handle(Graphic3d_CLight)& theLight) Standard_Boolean Graphic3d_LightSet::Add(const Handle(Graphic3d_CLight)& theLight)
{ {
if (theLight.IsNull()) if (theLight.IsNull())
@ -67,10 +63,8 @@ Standard_Boolean Graphic3d_LightSet::Add(const Handle(Graphic3d_CLight)& theLigh
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : Remove
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_LightSet::Remove(const Handle(Graphic3d_CLight)& theLight) Standard_Boolean Graphic3d_LightSet::Remove(const Handle(Graphic3d_CLight)& theLight)
{ {
const Standard_Integer anIndToRemove = myLights.FindIndex(theLight); const Standard_Integer anIndToRemove = myLights.FindIndex(theLight);
@ -85,10 +79,8 @@ Standard_Boolean Graphic3d_LightSet::Remove(const Handle(Graphic3d_CLight)& theL
return Standard_True; return Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : UpdateRevision
// purpose :
// =======================================================================
Standard_Size Graphic3d_LightSet::UpdateRevision() Standard_Size Graphic3d_LightSet::UpdateRevision()
{ {
if (myCacheRevision == myRevision) if (myCacheRevision == myRevision)

View File

@ -169,10 +169,8 @@ static Handle(Graphic3d_MarkerImage) getTextureImage(const Aspect_TypeOfMarker t
} }
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : Graphic3d_MarkerImage
// purpose :
// =======================================================================
Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(Image_PixMap)& theImage, Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(Image_PixMap)& theImage,
const Handle(Image_PixMap)& theImageAlpha) const Handle(Image_PixMap)& theImageAlpha)
: myImage(theImage), : myImage(theImage),
@ -201,10 +199,8 @@ Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(Image_PixMap)& theImag
} }
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_MarkerImage
// purpose :
// =======================================================================
Graphic3d_MarkerImage::Graphic3d_MarkerImage(const TCollection_AsciiString& theId, Graphic3d_MarkerImage::Graphic3d_MarkerImage(const TCollection_AsciiString& theId,
const TCollection_AsciiString& theAlphaId, const TCollection_AsciiString& theAlphaId,
const Handle(Image_PixMap)& theImage, const Handle(Image_PixMap)& theImage,
@ -231,10 +227,8 @@ Graphic3d_MarkerImage::Graphic3d_MarkerImage(const TCollection_AsciiString& theI
} }
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_MarkerImage
// purpose :
// =======================================================================
Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(TColStd_HArray1OfByte)& theBitMap, Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(TColStd_HArray1OfByte)& theBitMap,
const Standard_Integer theWidth, const Standard_Integer theWidth,
const Standard_Integer theHeight) const Standard_Integer theHeight)
@ -250,20 +244,16 @@ Graphic3d_MarkerImage::Graphic3d_MarkerImage(const Handle(TColStd_HArray1OfByte)
+ TCollection_AsciiString(THE_MARKER_IMAGE_COUNTER); + TCollection_AsciiString(THE_MARKER_IMAGE_COUNTER);
} }
// ======================================================================= //=================================================================================================
// function : IsColoredImage
// purpose :
// =======================================================================
bool Graphic3d_MarkerImage::IsColoredImage() const bool Graphic3d_MarkerImage::IsColoredImage() const
{ {
return !myImage.IsNull() && myImage->Format() != Image_Format_Alpha return !myImage.IsNull() && myImage->Format() != Image_Format_Alpha
&& myImage->Format() != Image_Format_Gray; && myImage->Format() != Image_Format_Gray;
} }
// ======================================================================= //=================================================================================================
// function : GetBitMapArray
// purpose :
// =======================================================================
Handle(TColStd_HArray1OfByte) Graphic3d_MarkerImage::GetBitMapArray( Handle(TColStd_HArray1OfByte) Graphic3d_MarkerImage::GetBitMapArray(
const Standard_Real theAlphaValue, const Standard_Real theAlphaValue,
const Standard_Boolean theIsTopDown) const const Standard_Boolean theIsTopDown) const
@ -306,10 +296,8 @@ Handle(TColStd_HArray1OfByte) Graphic3d_MarkerImage::GetBitMapArray(
return aBitMap; return aBitMap;
} }
// ======================================================================= //=================================================================================================
// function : GetImage
// purpose :
// =======================================================================
const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImage() const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImage()
{ {
if (!myImage.IsNull() || myBitMap.IsNull()) if (!myImage.IsNull() || myBitMap.IsNull())
@ -344,10 +332,8 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImage()
return myImage; return myImage;
} }
// ======================================================================= //=================================================================================================
// function : GetImageAlpha
// purpose :
// =======================================================================
const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha() const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha()
{ {
if (!myImageAlpha.IsNull()) if (!myImageAlpha.IsNull())
@ -382,28 +368,22 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImageAlpha()
return myImageAlpha; return myImageAlpha;
} }
// ======================================================================= //=================================================================================================
// function : GetImageId
// purpose :
// =======================================================================
const TCollection_AsciiString& Graphic3d_MarkerImage::GetImageId() const const TCollection_AsciiString& Graphic3d_MarkerImage::GetImageId() const
{ {
return myImageId; return myImageId;
} }
// ======================================================================= //=================================================================================================
// function : GetImageAlphaId
// purpose :
// =======================================================================
const TCollection_AsciiString& Graphic3d_MarkerImage::GetImageAlphaId() const const TCollection_AsciiString& Graphic3d_MarkerImage::GetImageAlphaId() const
{ {
return myImageAlphaId; return myImageAlphaId;
} }
// ======================================================================= //=================================================================================================
// function : GetTextureSize
// purpose :
// =======================================================================
void Graphic3d_MarkerImage::GetTextureSize(Standard_Integer& theWidth, void Graphic3d_MarkerImage::GetTextureSize(Standard_Integer& theWidth,
Standard_Integer& theHeight) const Standard_Integer& theHeight) const
{ {
@ -411,10 +391,8 @@ void Graphic3d_MarkerImage::GetTextureSize(Standard_Integer& theWidth,
theHeight = myHeight; theHeight = myHeight;
} }
// ======================================================================= //=================================================================================================
// function : GetMarkerImage
// purpose :
// =======================================================================
Handle(Graphic3d_MarkerImage) Graphic3d_MarkerImage::StandardMarker( Handle(Graphic3d_MarkerImage) Graphic3d_MarkerImage::StandardMarker(
const Aspect_TypeOfMarker theMarkerType, const Aspect_TypeOfMarker theMarkerType,
const Standard_ShortReal theScale, const Standard_ShortReal theScale,

View File

@ -69,10 +69,8 @@ static const RawMaterial THE_MATERIALS[] = {
RawMaterial(Graphic3d_NameOfMaterial_UserDefined, "UserDefined")}; RawMaterial(Graphic3d_NameOfMaterial_UserDefined, "UserDefined")};
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : RawMaterial
// purpose :
// =======================================================================
RawMaterial::RawMaterial(Graphic3d_NameOfMaterial theName, const char* theStringName) RawMaterial::RawMaterial(Graphic3d_NameOfMaterial theName, const char* theStringName)
: StringName(theStringName), : StringName(theStringName),
BSDF(Graphic3d_BSDF::CreateDiffuse(Graphic3d_Vec3(0.0f))), BSDF(Graphic3d_BSDF::CreateDiffuse(Graphic3d_Vec3(0.0f))),
@ -471,30 +469,24 @@ RawMaterial::RawMaterial(Graphic3d_NameOfMaterial theName, const char* theString
PBRMaterial.SetBSDF(BSDF); PBRMaterial.SetBSDF(BSDF);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_MaterialAspect
// purpose :
// =======================================================================
Graphic3d_MaterialAspect::Graphic3d_MaterialAspect() Graphic3d_MaterialAspect::Graphic3d_MaterialAspect()
: myRequestedMaterialName(Graphic3d_NameOfMaterial_DEFAULT) : myRequestedMaterialName(Graphic3d_NameOfMaterial_DEFAULT)
{ {
init(Graphic3d_NameOfMaterial_DEFAULT); init(Graphic3d_NameOfMaterial_DEFAULT);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_MaterialAspect
// purpose :
// =======================================================================
Graphic3d_MaterialAspect::Graphic3d_MaterialAspect(const Graphic3d_NameOfMaterial theName) Graphic3d_MaterialAspect::Graphic3d_MaterialAspect(const Graphic3d_NameOfMaterial theName)
: myRequestedMaterialName(theName) : myRequestedMaterialName(theName)
{ {
init(theName); init(theName);
} }
// ======================================================================= //=================================================================================================
// function : init
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::init(const Graphic3d_NameOfMaterial theName) void Graphic3d_MaterialAspect::init(const Graphic3d_NameOfMaterial theName)
{ {
const RawMaterial& aMat = THE_MATERIALS[theName]; const RawMaterial& aMat = THE_MATERIALS[theName];
@ -513,10 +505,8 @@ void Graphic3d_MaterialAspect::init(const Graphic3d_NameOfMaterial theName)
myRequestedMaterialName = theName; myRequestedMaterialName = theName;
} }
// ======================================================================= //=================================================================================================
// function : IncreaseShine
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::IncreaseShine(const Standard_ShortReal theDelta) void Graphic3d_MaterialAspect::IncreaseShine(const Standard_ShortReal theDelta)
{ {
const Standard_ShortReal anOldShine = myShininess; const Standard_ShortReal anOldShine = myShininess;
@ -527,10 +517,8 @@ void Graphic3d_MaterialAspect::IncreaseShine(const Standard_ShortReal theDelta)
} }
} }
// ======================================================================= //=================================================================================================
// function : SetMaterialType
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetMaterialType(const Graphic3d_TypeOfMaterial theType) void Graphic3d_MaterialAspect::SetMaterialType(const Graphic3d_TypeOfMaterial theType)
{ {
myMaterialType = theType; myMaterialType = theType;
@ -540,10 +528,8 @@ void Graphic3d_MaterialAspect::SetMaterialType(const Graphic3d_TypeOfMaterial th
} }
} }
// ======================================================================= //=================================================================================================
// function : SetColor
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetColor(const Quantity_Color& theColor) void Graphic3d_MaterialAspect::SetColor(const Quantity_Color& theColor)
{ {
if (myMaterialType == Graphic3d_MATERIAL_ASPECT) if (myMaterialType == Graphic3d_MATERIAL_ASPECT)
@ -566,10 +552,8 @@ void Graphic3d_MaterialAspect::SetColor(const Quantity_Color& theColor)
myColors[Graphic3d_TOR_DIFFUSE] = aDiffuse; myColors[Graphic3d_TOR_DIFFUSE] = aDiffuse;
} }
// ======================================================================= //=================================================================================================
// function : SetAmbientColor
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetAmbientColor(const Quantity_Color& theColor) void Graphic3d_MaterialAspect::SetAmbientColor(const Quantity_Color& theColor)
{ {
if (myMaterialType == Graphic3d_MATERIAL_PHYSIC if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
@ -581,10 +565,8 @@ void Graphic3d_MaterialAspect::SetAmbientColor(const Quantity_Color& theColor)
myColors[Graphic3d_TOR_AMBIENT] = theColor; myColors[Graphic3d_TOR_AMBIENT] = theColor;
} }
// ======================================================================= //=================================================================================================
// function : SetDiffuseColor
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetDiffuseColor(const Quantity_Color& theColor) void Graphic3d_MaterialAspect::SetDiffuseColor(const Quantity_Color& theColor)
{ {
if (myMaterialType == Graphic3d_MATERIAL_PHYSIC if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
@ -596,10 +578,8 @@ void Graphic3d_MaterialAspect::SetDiffuseColor(const Quantity_Color& theColor)
myColors[Graphic3d_TOR_DIFFUSE] = theColor; myColors[Graphic3d_TOR_DIFFUSE] = theColor;
} }
// ======================================================================= //=================================================================================================
// function : SetSpecularColor
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetSpecularColor(const Quantity_Color& theColor) void Graphic3d_MaterialAspect::SetSpecularColor(const Quantity_Color& theColor)
{ {
if (myMaterialType == Graphic3d_MATERIAL_PHYSIC if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
@ -611,10 +591,8 @@ void Graphic3d_MaterialAspect::SetSpecularColor(const Quantity_Color& theColor)
myColors[Graphic3d_TOR_SPECULAR] = theColor; myColors[Graphic3d_TOR_SPECULAR] = theColor;
} }
// ======================================================================= //=================================================================================================
// function : SetEmissiveColor
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetEmissiveColor(const Quantity_Color& theColor) void Graphic3d_MaterialAspect::SetEmissiveColor(const Quantity_Color& theColor)
{ {
if (myMaterialType == Graphic3d_MATERIAL_PHYSIC if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
@ -626,10 +604,8 @@ void Graphic3d_MaterialAspect::SetEmissiveColor(const Quantity_Color& theColor)
myColors[Graphic3d_TOR_EMISSION] = theColor; myColors[Graphic3d_TOR_EMISSION] = theColor;
} }
// ======================================================================= //=================================================================================================
// function : SetTransparency
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetTransparency(const Standard_ShortReal theValue) void Graphic3d_MaterialAspect::SetTransparency(const Standard_ShortReal theValue)
{ {
if (theValue < 0.0f || theValue > 1.0f) if (theValue < 0.0f || theValue > 1.0f)
@ -641,10 +617,8 @@ void Graphic3d_MaterialAspect::SetTransparency(const Standard_ShortReal theValue
myPBRMaterial.SetAlpha(1.0f - theValue); myPBRMaterial.SetAlpha(1.0f - theValue);
} }
// ======================================================================= //=================================================================================================
// function : SetRefractionIndex
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetRefractionIndex(const Standard_ShortReal theValue) void Graphic3d_MaterialAspect::SetRefractionIndex(const Standard_ShortReal theValue)
{ {
if (theValue < 1.0f) if (theValue < 1.0f)
@ -655,10 +629,8 @@ void Graphic3d_MaterialAspect::SetRefractionIndex(const Standard_ShortReal theVa
myRefractionIndex = theValue; myRefractionIndex = theValue;
} }
// ======================================================================= //=================================================================================================
// function : SetShininess
// purpose :
// =======================================================================
void Graphic3d_MaterialAspect::SetShininess(const Standard_ShortReal theValue) void Graphic3d_MaterialAspect::SetShininess(const Standard_ShortReal theValue)
{ {
if (theValue < 0.0f || theValue > 1.0f) if (theValue < 0.0f || theValue > 1.0f)
@ -673,10 +645,8 @@ void Graphic3d_MaterialAspect::SetShininess(const Standard_ShortReal theValue)
} }
} }
// ======================================================================= //=================================================================================================
// function : MaterialName
// purpose :
// =======================================================================
Standard_CString Graphic3d_MaterialAspect::MaterialName(const Standard_Integer theRank) Standard_CString Graphic3d_MaterialAspect::MaterialName(const Standard_Integer theRank)
{ {
if (theRank < 1 || theRank > NumberOfMaterials()) if (theRank < 1 || theRank > NumberOfMaterials())
@ -687,10 +657,8 @@ Standard_CString Graphic3d_MaterialAspect::MaterialName(const Standard_Integer t
return aMat.StringName; return aMat.StringName;
} }
// ======================================================================= //=================================================================================================
// function : MaterialFromName
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_MaterialAspect::MaterialFromName(const Standard_CString theName, Standard_Boolean Graphic3d_MaterialAspect::MaterialFromName(const Standard_CString theName,
Graphic3d_NameOfMaterial& theMat) Graphic3d_NameOfMaterial& theMat)
{ {
@ -742,10 +710,8 @@ Standard_Boolean Graphic3d_MaterialAspect::MaterialFromName(const Standard_CStri
return Standard_False; return Standard_False;
} }
// ======================================================================= //=================================================================================================
// function : MaterialType
// purpose :
// =======================================================================
Graphic3d_TypeOfMaterial Graphic3d_MaterialAspect::MaterialType(const Standard_Integer theRank) Graphic3d_TypeOfMaterial Graphic3d_MaterialAspect::MaterialType(const Standard_Integer theRank)
{ {
if (theRank < 1 || theRank > NumberOfMaterials()) if (theRank < 1 || theRank > NumberOfMaterials())

View File

@ -36,10 +36,8 @@ extern "C"
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MediaTexture, Graphic3d_Texture2D) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MediaTexture, Graphic3d_Texture2D)
// ================================================================ //=================================================================================================
// Function : Graphic3d_MediaTexture
// Purpose :
// ================================================================
Graphic3d_MediaTexture::Graphic3d_MediaTexture(const Handle(Standard_HMutex)& theMutex, Graphic3d_MediaTexture::Graphic3d_MediaTexture(const Handle(Standard_HMutex)& theMutex,
Standard_Integer thePlane) Standard_Integer thePlane)
: Graphic3d_Texture2D("", Graphic3d_TypeOfTexture_2D), : Graphic3d_Texture2D("", Graphic3d_TypeOfTexture_2D),
@ -52,10 +50,8 @@ Graphic3d_MediaTexture::Graphic3d_MediaTexture(const Handle(Standard_HMutex)& th
myParams->SetTextureUnit(Graphic3d_TextureUnit(int(Graphic3d_TextureUnit_0) + thePlane)); myParams->SetTextureUnit(Graphic3d_TextureUnit(int(Graphic3d_TextureUnit_0) + thePlane));
} }
// ================================================================ //=================================================================================================
// Function : GetImage
// Purpose :
// ================================================================
Handle(Image_PixMap) Graphic3d_MediaTexture::GetImage(const Handle(Image_SupportedFormats)&) Handle(Image_PixMap) Graphic3d_MediaTexture::GetImage(const Handle(Image_SupportedFormats)&)
{ {
Standard_Mutex::Sentry aLock(myMutex.get()); Standard_Mutex::Sentry aLock(myMutex.get());

View File

@ -35,10 +35,8 @@ extern "C"
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MediaTextureSet, Graphic3d_TextureSet) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MediaTextureSet, Graphic3d_TextureSet)
// ================================================================ //=================================================================================================
// Function : Graphic3d_MediaTexture
// Purpose :
// ================================================================
Graphic3d_MediaTextureSet::Graphic3d_MediaTextureSet() Graphic3d_MediaTextureSet::Graphic3d_MediaTextureSet()
: Graphic3d_TextureSet(4), : Graphic3d_TextureSet(4),
myMutex(new Standard_HMutex()), myMutex(new Standard_HMutex()),
@ -111,10 +109,8 @@ Graphic3d_MediaTextureSet::Graphic3d_MediaTextureSet()
aSrcFrag + F_SHADER_YUV2RGB_FULL)); aSrcFrag + F_SHADER_YUV2RGB_FULL));
} }
// ======================================================================= //=================================================================================================
// function : SetCallback
// purpose :
// =======================================================================
void Graphic3d_MediaTextureSet::SetCallback(CallbackOnUpdate_t theCallbackFunction, void Graphic3d_MediaTextureSet::SetCallback(CallbackOnUpdate_t theCallbackFunction,
void* theCallbackUserPtr) void* theCallbackUserPtr)
{ {
@ -122,10 +118,8 @@ void Graphic3d_MediaTextureSet::SetCallback(CallbackOnUpdate_t theCallbackFuncti
myCallbackUserPtr = theCallbackUserPtr; myCallbackUserPtr = theCallbackUserPtr;
} }
// ======================================================================= //=================================================================================================
// function : Notify
// purpose :
// =======================================================================
void Graphic3d_MediaTextureSet::Notify() void Graphic3d_MediaTextureSet::Notify()
{ {
if (myCallbackFunction != NULL) if (myCallbackFunction != NULL)
@ -134,10 +128,8 @@ void Graphic3d_MediaTextureSet::Notify()
} }
} }
// ======================================================================= //=================================================================================================
// function : OpenInput
// purpose :
// =======================================================================
void Graphic3d_MediaTextureSet::OpenInput(const TCollection_AsciiString& thePath, void Graphic3d_MediaTextureSet::OpenInput(const TCollection_AsciiString& thePath,
Standard_Boolean theToWait) Standard_Boolean theToWait)
{ {
@ -159,10 +151,8 @@ void Graphic3d_MediaTextureSet::OpenInput(const TCollection_AsciiString& thePath
myInput = thePath; myInput = thePath;
} }
// ======================================================================= //=================================================================================================
// function : LockFrame
// purpose :
// =======================================================================
Handle(Media_Frame) Graphic3d_MediaTextureSet::LockFrame() Handle(Media_Frame) Graphic3d_MediaTextureSet::LockFrame()
{ {
{ {
@ -184,10 +174,8 @@ Handle(Media_Frame) Graphic3d_MediaTextureSet::LockFrame()
return Handle(Media_Frame)(); return Handle(Media_Frame)();
} }
// ======================================================================= //=================================================================================================
// function : ReleaseFrame
// purpose :
// =======================================================================
void Graphic3d_MediaTextureSet::ReleaseFrame(const Handle(Media_Frame)& theFrame) void Graphic3d_MediaTextureSet::ReleaseFrame(const Handle(Media_Frame)& theFrame)
{ {
{ {
@ -202,10 +190,8 @@ void Graphic3d_MediaTextureSet::ReleaseFrame(const Handle(Media_Frame)& theFrame
} }
} }
// ================================================================ //=================================================================================================
// Function : SwapFrames
// Purpose :
// ================================================================
Standard_Boolean Graphic3d_MediaTextureSet::SwapFrames() Standard_Boolean Graphic3d_MediaTextureSet::SwapFrames()
{ {
if (myPlayerCtx.IsNull()) if (myPlayerCtx.IsNull())

View File

@ -18,10 +18,8 @@
#include <limits> #include <limits>
// ======================================================================= //=================================================================================================
// function : RoughnessFromSpecular
// purpose :
// =======================================================================
Standard_ShortReal Graphic3d_PBRMaterial::RoughnessFromSpecular(const Quantity_Color& theSpecular, Standard_ShortReal Graphic3d_PBRMaterial::RoughnessFromSpecular(const Quantity_Color& theSpecular,
const Standard_Real theShiness) const Standard_Real theShiness)
{ {
@ -37,10 +35,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::RoughnessFromSpecular(const Quantity_C
return (Standard_ShortReal)aRoughnessFactor; return (Standard_ShortReal)aRoughnessFactor;
} }
// ======================================================================= //=================================================================================================
// function : Constructor
// purpose :
// =======================================================================
Graphic3d_PBRMaterial::Graphic3d_PBRMaterial() Graphic3d_PBRMaterial::Graphic3d_PBRMaterial()
: myColor(0.f, 0.f, 0.f, 1.f), : myColor(0.f, 0.f, 0.f, 1.f),
myMetallic(0.f), myMetallic(0.f),
@ -50,19 +46,15 @@ Graphic3d_PBRMaterial::Graphic3d_PBRMaterial()
{ {
} }
// ======================================================================= //=================================================================================================
// function : Constructor
// purpose :
// =======================================================================
Graphic3d_PBRMaterial::Graphic3d_PBRMaterial(const Graphic3d_BSDF& theBSDF) Graphic3d_PBRMaterial::Graphic3d_PBRMaterial(const Graphic3d_BSDF& theBSDF)
{ {
SetBSDF(theBSDF); SetBSDF(theBSDF);
} }
// ======================================================================= //=================================================================================================
// function : SetMetallic
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetMetallic(Standard_ShortReal theMetallic) void Graphic3d_PBRMaterial::SetMetallic(Standard_ShortReal theMetallic)
{ {
Graphic3d_MaterialDefinitionError_Raise_if( Graphic3d_MaterialDefinitionError_Raise_if(
@ -70,19 +62,15 @@ void Graphic3d_PBRMaterial::SetMetallic(Standard_ShortReal theMetallic)
"'metallic' parameter of PBR material must be in range [0, 1]") myMetallic = theMetallic; "'metallic' parameter of PBR material must be in range [0, 1]") myMetallic = theMetallic;
} }
// ======================================================================= //=================================================================================================
// function : Roughness
// purpose :
// =======================================================================
Standard_ShortReal Graphic3d_PBRMaterial::Roughness(Standard_ShortReal theNormalizedRoughness) Standard_ShortReal Graphic3d_PBRMaterial::Roughness(Standard_ShortReal theNormalizedRoughness)
{ {
return theNormalizedRoughness * (1.f - MinRoughness()) + MinRoughness(); return theNormalizedRoughness * (1.f - MinRoughness()) + MinRoughness();
} }
// ======================================================================= //=================================================================================================
// function : SetRoughness
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetRoughness(Standard_ShortReal theRoughness) void Graphic3d_PBRMaterial::SetRoughness(Standard_ShortReal theRoughness)
{ {
Graphic3d_MaterialDefinitionError_Raise_if( Graphic3d_MaterialDefinitionError_Raise_if(
@ -90,10 +78,8 @@ void Graphic3d_PBRMaterial::SetRoughness(Standard_ShortReal theRoughness)
"'roughness' parameter of PBR material must be in range [0, 1]") myRoughness = theRoughness; "'roughness' parameter of PBR material must be in range [0, 1]") myRoughness = theRoughness;
} }
// ======================================================================= //=================================================================================================
// function : SetIOR
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetIOR(Standard_ShortReal theIOR) void Graphic3d_PBRMaterial::SetIOR(Standard_ShortReal theIOR)
{ {
Graphic3d_MaterialDefinitionError_Raise_if( Graphic3d_MaterialDefinitionError_Raise_if(
@ -101,29 +87,23 @@ void Graphic3d_PBRMaterial::SetIOR(Standard_ShortReal theIOR)
"'IOR' parameter of PBR material must be in range [1, 3]") myIOR = theIOR; "'IOR' parameter of PBR material must be in range [1, 3]") myIOR = theIOR;
} }
// ======================================================================= //=================================================================================================
// function : SetColor
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetColor(const Quantity_ColorRGBA& theColor) void Graphic3d_PBRMaterial::SetColor(const Quantity_ColorRGBA& theColor)
{ {
myColor.SetRGB(theColor.GetRGB()); myColor.SetRGB(theColor.GetRGB());
SetAlpha(theColor.Alpha()); SetAlpha(theColor.Alpha());
} }
// ======================================================================= //=================================================================================================
// function : SetColor
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetColor(const Quantity_Color& theColor) void Graphic3d_PBRMaterial::SetColor(const Quantity_Color& theColor)
{ {
myColor.SetRGB(theColor); myColor.SetRGB(theColor);
} }
// ======================================================================= //=================================================================================================
// function : SetAlpha
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetAlpha(Standard_ShortReal theAlpha) void Graphic3d_PBRMaterial::SetAlpha(Standard_ShortReal theAlpha)
{ {
Graphic3d_MaterialDefinitionError_Raise_if( Graphic3d_MaterialDefinitionError_Raise_if(
@ -131,10 +111,8 @@ void Graphic3d_PBRMaterial::SetAlpha(Standard_ShortReal theAlpha)
"'alpha' parameter of PBR material must be in range [0, 1]") myColor.SetAlpha(theAlpha); "'alpha' parameter of PBR material must be in range [0, 1]") myColor.SetAlpha(theAlpha);
} }
// ======================================================================= //=================================================================================================
// function : SetEmission
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetEmission(const Graphic3d_Vec3& theEmission) void Graphic3d_PBRMaterial::SetEmission(const Graphic3d_Vec3& theEmission)
{ {
Graphic3d_MaterialDefinitionError_Raise_if( Graphic3d_MaterialDefinitionError_Raise_if(
@ -143,10 +121,8 @@ void Graphic3d_PBRMaterial::SetEmission(const Graphic3d_Vec3& theEmission)
theEmission; theEmission;
} }
// ======================================================================= //=================================================================================================
// function : SetBSDF
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::SetBSDF(const Graphic3d_BSDF& theBSDF) void Graphic3d_PBRMaterial::SetBSDF(const Graphic3d_BSDF& theBSDF)
{ {
SetEmission(theBSDF.Le); SetEmission(theBSDF.Le);
@ -195,10 +171,8 @@ void Graphic3d_PBRMaterial::SetBSDF(const Graphic3d_BSDF& theBSDF)
} }
} }
// ======================================================================= //=================================================================================================
// function : GenerateEnvLUT
// purpose :
// =======================================================================
void Graphic3d_PBRMaterial::GenerateEnvLUT(const Handle(Image_PixMap)& theLUT, void Graphic3d_PBRMaterial::GenerateEnvLUT(const Handle(Image_PixMap)& theLUT,
unsigned int theNbIntegralSamples) unsigned int theNbIntegralSamples)
{ {
@ -242,10 +216,8 @@ void Graphic3d_PBRMaterial::GenerateEnvLUT(const Handle(Image_PixMap)& theLUT,
} }
} }
// ======================================================================= //=================================================================================================
// function : SpecIBLMapSamplesFactor
// purpose :
// =======================================================================
Standard_ShortReal Graphic3d_PBRMaterial::SpecIBLMapSamplesFactor(Standard_ShortReal theProbability, Standard_ShortReal Graphic3d_PBRMaterial::SpecIBLMapSamplesFactor(Standard_ShortReal theProbability,
Standard_ShortReal theRoughness) Standard_ShortReal theRoughness)
{ {
@ -253,10 +225,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::SpecIBLMapSamplesFactor(Standard_Short
/ Standard_ShortReal(M_PI); / Standard_ShortReal(M_PI);
} }
// ======================================================================= //=================================================================================================
// function : lutGenGeometryFactor
// purpose :
// =======================================================================
Standard_ShortReal Graphic3d_PBRMaterial::lutGenGeometryFactor(Standard_ShortReal theCosL, Standard_ShortReal Graphic3d_PBRMaterial::lutGenGeometryFactor(Standard_ShortReal theCosL,
Standard_ShortReal theCosV, Standard_ShortReal theCosV,
Standard_ShortReal theRoughness) Standard_ShortReal theRoughness)
@ -270,10 +240,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::lutGenGeometryFactor(Standard_ShortRea
return aGeometryFactor; return aGeometryFactor;
} }
// ======================================================================= //=================================================================================================
// function : lutGenHammersley
// purpose :
// =======================================================================
Graphic3d_Vec2 Graphic3d_PBRMaterial::lutGenHammersley(unsigned int theNumber, Graphic3d_Vec2 Graphic3d_PBRMaterial::lutGenHammersley(unsigned int theNumber,
unsigned int theCount) unsigned int theCount)
{ {
@ -290,10 +258,8 @@ Graphic3d_Vec2 Graphic3d_PBRMaterial::lutGenHammersley(unsigned int theNumber,
return Graphic3d_Vec2(theNumber / Standard_ShortReal(theCount), aPhi2); return Graphic3d_Vec2(theNumber / Standard_ShortReal(theCount), aPhi2);
} }
// ======================================================================= //=================================================================================================
// function : lutGenImportanceSampleCosTheta
// purpose :
// =======================================================================
Standard_ShortReal Graphic3d_PBRMaterial::lutGenImportanceSampleCosTheta( Standard_ShortReal Graphic3d_PBRMaterial::lutGenImportanceSampleCosTheta(
Standard_ShortReal theHammersleyPointComponent, Standard_ShortReal theHammersleyPointComponent,
Standard_ShortReal theRoughness) Standard_ShortReal theRoughness)
@ -313,10 +279,8 @@ Standard_ShortReal Graphic3d_PBRMaterial::lutGenImportanceSampleCosTheta(
} }
} }
// ======================================================================= //=================================================================================================
// function : lutGenImportanceSample
// purpose :
// =======================================================================
Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenImportanceSample( Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenImportanceSample(
const Graphic3d_Vec2& theHammerslayPoint, const Graphic3d_Vec2& theHammerslayPoint,
Standard_ShortReal theRoughness) Standard_ShortReal theRoughness)
@ -330,19 +294,15 @@ Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenImportanceSample(
return Graphic3d_Vec3(aSinTheta * cosf(aPhi), aSinTheta * sinf(aPhi), aCosTheta); return Graphic3d_Vec3(aSinTheta * cosf(aPhi), aSinTheta * sinf(aPhi), aCosTheta);
} }
// ======================================================================= //=================================================================================================
// function : lutGenView
// purpose :
// =======================================================================
Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenView(Standard_ShortReal theCosV) Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenView(Standard_ShortReal theCosV)
{ {
return Graphic3d_Vec3(0.f, sqrtf(1.f - theCosV * theCosV), theCosV); return Graphic3d_Vec3(0.f, sqrtf(1.f - theCosV * theCosV), theCosV);
} }
// ======================================================================= //=================================================================================================
// function : lutGenReflect
// purpose :
// =======================================================================
Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenReflect(const Graphic3d_Vec3& theVector, Graphic3d_Vec3 Graphic3d_PBRMaterial::lutGenReflect(const Graphic3d_Vec3& theVector,
const Graphic3d_Vec3& theAxis) const Graphic3d_Vec3& theAxis)
{ {

View File

@ -19,10 +19,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_PresentationAttributes, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_PresentationAttributes, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_PresentationAttributes::DumpJson(Standard_OStream& theOStream, void Graphic3d_PresentationAttributes::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {

View File

@ -15,20 +15,16 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_SequenceOfHClipPlane, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_SequenceOfHClipPlane, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_SequenceOfHClipPlane
// purpose :
// =======================================================================
Graphic3d_SequenceOfHClipPlane::Graphic3d_SequenceOfHClipPlane() Graphic3d_SequenceOfHClipPlane::Graphic3d_SequenceOfHClipPlane()
: myToOverrideGlobal(Standard_False) : myToOverrideGlobal(Standard_False)
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : Append
// purpose :
// =======================================================================
bool Graphic3d_SequenceOfHClipPlane::Append(const Handle(Graphic3d_ClipPlane)& theItem) bool Graphic3d_SequenceOfHClipPlane::Append(const Handle(Graphic3d_ClipPlane)& theItem)
{ {
for (NCollection_Sequence<Handle(Graphic3d_ClipPlane)>::Iterator anItemIter(myItems); for (NCollection_Sequence<Handle(Graphic3d_ClipPlane)>::Iterator anItemIter(myItems);
@ -44,10 +40,8 @@ bool Graphic3d_SequenceOfHClipPlane::Append(const Handle(Graphic3d_ClipPlane)& t
return true; return true;
} }
// ======================================================================= //=================================================================================================
// function : Remove
// purpose :
// =======================================================================
bool Graphic3d_SequenceOfHClipPlane::Remove(const Handle(Graphic3d_ClipPlane)& theItem) bool Graphic3d_SequenceOfHClipPlane::Remove(const Handle(Graphic3d_ClipPlane)& theItem)
{ {
for (NCollection_Sequence<Handle(Graphic3d_ClipPlane)>::Iterator anItemIter(myItems); for (NCollection_Sequence<Handle(Graphic3d_ClipPlane)>::Iterator anItemIter(myItems);
@ -63,10 +57,8 @@ bool Graphic3d_SequenceOfHClipPlane::Remove(const Handle(Graphic3d_ClipPlane)& t
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_SequenceOfHClipPlane::DumpJson(Standard_OStream& theOStream, void Graphic3d_SequenceOfHClipPlane::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {

View File

@ -17,10 +17,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ShaderAttribute, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ShaderAttribute, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_ShaderAttribute
// purpose :
// =======================================================================
Graphic3d_ShaderAttribute::Graphic3d_ShaderAttribute(const TCollection_AsciiString& theName, Graphic3d_ShaderAttribute::Graphic3d_ShaderAttribute(const TCollection_AsciiString& theName,
const int theLocation) const int theLocation)
: myName(theName), : myName(theName),
@ -29,10 +27,8 @@ Graphic3d_ShaderAttribute::Graphic3d_ShaderAttribute(const TCollection_AsciiStri
// //
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_ShaderAttribute
// purpose :
// =======================================================================
Graphic3d_ShaderAttribute::~Graphic3d_ShaderAttribute() Graphic3d_ShaderAttribute::~Graphic3d_ShaderAttribute()
{ {
// //

View File

@ -187,10 +187,8 @@ const char THE_VERT_gl_Position_OUTLINE[] = EOL
} // namespace } // namespace
// ======================================================================= //=================================================================================================
// function : genLightKey
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_ShaderManager::genLightKey( TCollection_AsciiString Graphic3d_ShaderManager::genLightKey(
const Handle(Graphic3d_LightSet)& theLights, const Handle(Graphic3d_LightSet)& theLights,
const bool theHasShadowMap) const const bool theHasShadowMap) const
@ -205,10 +203,8 @@ TCollection_AsciiString Graphic3d_ShaderManager::genLightKey(
return TCollection_AsciiString("l_") + theLights->KeyEnabledShort() + aMaxLimit; return TCollection_AsciiString("l_") + theLights->KeyEnabledShort() + aMaxLimit;
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_ShaderManager
// purpose :
// =======================================================================
Graphic3d_ShaderManager::Graphic3d_ShaderManager(Aspect_GraphicsLibrary theGapi) Graphic3d_ShaderManager::Graphic3d_ShaderManager(Aspect_GraphicsLibrary theGapi)
: myGapi(theGapi), : myGapi(theGapi),
// desktop defines a dedicated API for point size, with gl_PointSize added later to GLSL // desktop defines a dedicated API for point size, with gl_PointSize added later to GLSL
@ -222,19 +218,15 @@ Graphic3d_ShaderManager::Graphic3d_ShaderManager(Aspect_GraphicsLibrary theGapi)
memset(myGlslExtensions, 0, sizeof(myGlslExtensions)); memset(myGlslExtensions, 0, sizeof(myGlslExtensions));
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_ShaderManager
// purpose :
// =======================================================================
Graphic3d_ShaderManager::~Graphic3d_ShaderManager() Graphic3d_ShaderManager::~Graphic3d_ShaderManager()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : hasGlslBitwiseOps
// purpose :
// =======================================================================
bool Graphic3d_ShaderManager::hasGlslBitwiseOps() const bool Graphic3d_ShaderManager::hasGlslBitwiseOps() const
{ {
switch (myGapi) switch (myGapi)
@ -250,10 +242,8 @@ bool Graphic3d_ShaderManager::hasGlslBitwiseOps() const
return false; return false;
} }
// ======================================================================= //=================================================================================================
// function : defaultGlslVersion
// purpose :
// =======================================================================
int Graphic3d_ShaderManager::defaultGlslVersion(const Handle(Graphic3d_ShaderProgram)& theProgram, int Graphic3d_ShaderManager::defaultGlslVersion(const Handle(Graphic3d_ShaderProgram)& theProgram,
const TCollection_AsciiString& theName, const TCollection_AsciiString& theName,
int theBits, int theBits,
@ -385,10 +375,8 @@ int Graphic3d_ShaderManager::defaultGlslVersion(const Handle(Graphic3d_ShaderPro
return aBits; return aBits;
} }
// ======================================================================= //=================================================================================================
// function : defaultOitGlslVersion
// purpose :
// =======================================================================
void Graphic3d_ShaderManager::defaultOitGlslVersion( void Graphic3d_ShaderManager::defaultOitGlslVersion(
const Handle(Graphic3d_ShaderProgram)& theProgram, const Handle(Graphic3d_ShaderProgram)& theProgram,
const TCollection_AsciiString& theName, const TCollection_AsciiString& theName,
@ -438,10 +426,8 @@ void Graphic3d_ShaderManager::defaultOitGlslVersion(
theProgram->SetId(TCollection_AsciiString("occt_") + theName + (theMsaa ? "_msaa" : "")); theProgram->SetId(TCollection_AsciiString("occt_") + theName + (theMsaa ? "_msaa" : ""));
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramFont
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFont() const Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFont() const
{ {
Graphic3d_ShaderObject::ShaderVariableList aUniforms, aStageInOuts; Graphic3d_ShaderObject::ShaderVariableList aUniforms, aStageInOuts;
@ -482,10 +468,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFont() con
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramFboBlit
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFboBlit( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFboBlit(
Standard_Integer theNbSamples, Standard_Integer theNbSamples,
Standard_Boolean theIsFallback_sRGB) const Standard_Boolean theIsFallback_sRGB) const
@ -605,10 +589,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramFboBlit(
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramOitCompositing
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitCompositing( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitCompositing(
const Standard_Boolean theMsaa) const const Standard_Boolean theMsaa) const
{ {
@ -664,10 +646,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitComposi
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramOitDepthPeelingBlend
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPeelingBlend( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPeelingBlend(
Standard_Boolean theMsaa) const Standard_Boolean theMsaa) const
{ {
@ -701,10 +681,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPe
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramOitDepthPeelingFlush
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPeelingFlush( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPeelingFlush(
Standard_Boolean theMsaa) const Standard_Boolean theMsaa) const
{ {
@ -747,10 +725,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramOitDepthPe
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : pointSpriteAlphaSrc
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteAlphaSrc(Standard_Integer theBits) const TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteAlphaSrc(Standard_Integer theBits) const
{ {
const bool isAlpha = const bool isAlpha =
@ -762,10 +738,8 @@ TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteAlphaSrc(Standard_In
"occTexture2D(occSamplerPointSprite, " THE_VEC2_glPointCoord ").a; }"; "occTexture2D(occSamplerPointSprite, " THE_VEC2_glPointCoord ").a; }";
} }
// ======================================================================= //=================================================================================================
// function : pointSpriteShadingSrc
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteShadingSrc( TCollection_AsciiString Graphic3d_ShaderManager::pointSpriteShadingSrc(
const TCollection_AsciiString& theBaseColorSrc, const TCollection_AsciiString& theBaseColorSrc,
Standard_Integer theBits) const Standard_Integer theBits) const
@ -893,10 +867,8 @@ static TCollection_AsciiString prepareGeomMainSrc(
return aSrcMainGeom; return aSrcMainGeom;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramUnlit
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramUnlit( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramUnlit(
Standard_Integer theBits, Standard_Integer theBits,
Standard_Boolean theIsOutline) const Standard_Boolean theIsOutline) const
@ -1145,10 +1117,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramUnlit(
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : stdComputeLighting
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting( TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting(
Standard_Integer& theNbLights, Standard_Integer& theNbLights,
const Handle(Graphic3d_LightSet)& theLights, const Handle(Graphic3d_LightSet)& theLights,
@ -1366,10 +1336,8 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting(
} }
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramGouraud
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramGouraud( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramGouraud(
const Handle(Graphic3d_LightSet)& theLights, const Handle(Graphic3d_LightSet)& theLights,
Standard_Integer theBits) const Standard_Integer theBits) const
@ -1534,10 +1502,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramGouraud(
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramPhong
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong(
const Handle(Graphic3d_LightSet)& theLights, const Handle(Graphic3d_LightSet)& theLights,
const Standard_Integer theBits, const Standard_Integer theBits,
@ -1799,10 +1765,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong(
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramStereo
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo(
Graphic3d_StereoMode theStereoMode) const Graphic3d_StereoMode theStereoMode) const
{ {
@ -1938,10 +1902,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo(
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getStdProgramBoundBox
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramBoundBox() const Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramBoundBox() const
{ {
Handle(Graphic3d_ShaderProgram) aProgramSrc = new Graphic3d_ShaderProgram(); Handle(Graphic3d_ShaderProgram) aProgramSrc = new Graphic3d_ShaderProgram();
@ -1978,10 +1940,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramBoundBox()
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getPBREnvBakingProgram
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram( Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram(
Standard_Integer theIndex) const Standard_Integer theIndex) const
{ {
@ -2045,10 +2005,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram(
return aProgramSrc; return aProgramSrc;
} }
// ======================================================================= //=================================================================================================
// function : getBgCubeMapProgram
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() const Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() const
{ {
Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram();
@ -2116,10 +2074,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() c
return aProgSrc; return aProgSrc;
} }
// ======================================================================= //=================================================================================================
// function : getBgSkydomeProgram
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgSkydomeProgram() const Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgSkydomeProgram() const
{ {
Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram();
@ -2159,10 +2115,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgSkydomeProgram() c
return aProgSrc; return aProgSrc;
} }
// ======================================================================= //=================================================================================================
// function : getColoredQuadProgram
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getColoredQuadProgram() const Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getColoredQuadProgram() const
{ {
Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram();

View File

@ -93,10 +93,8 @@ Standard_Boolean Graphic3d_ShaderObject::IsDone() const
return !mySource.IsEmpty(); return !mySource.IsEmpty();
} }
// ======================================================================= //=================================================================================================
// function : CreateFromSource
// purpose :
// =======================================================================
Handle(Graphic3d_ShaderObject) Graphic3d_ShaderObject::CreateFromSource( Handle(Graphic3d_ShaderObject) Graphic3d_ShaderObject::CreateFromSource(
TCollection_AsciiString& theSource, TCollection_AsciiString& theSource,
Graphic3d_TypeOfShaderObject theType, Graphic3d_TypeOfShaderObject theType,

View File

@ -31,10 +31,8 @@ namespace
static volatile Standard_Integer THE_PROGRAM_OBJECT_COUNTER = 0; static volatile Standard_Integer THE_PROGRAM_OBJECT_COUNTER = 0;
} }
// ======================================================================= //=================================================================================================
// function : ShadersFolder
// purpose :
// =======================================================================
const TCollection_AsciiString& Graphic3d_ShaderProgram::ShadersFolder() const TCollection_AsciiString& Graphic3d_ShaderProgram::ShadersFolder()
{ {
static Standard_Boolean THE_IS_DEFINED = Standard_False; static Standard_Boolean THE_IS_DEFINED = Standard_False;
@ -176,10 +174,8 @@ void Graphic3d_ShaderProgram::ClearVariables()
myVariables.Clear(); myVariables.Clear();
} }
// ======================================================================= //=================================================================================================
// function : SetAttributes
// purpose :
// =======================================================================
void Graphic3d_ShaderProgram::SetVertexAttributes( void Graphic3d_ShaderProgram::SetVertexAttributes(
const Graphic3d_ShaderAttributeList& theAttributes) const Graphic3d_ShaderAttributeList& theAttributes)
{ {

View File

@ -24,10 +24,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_StructureManager, Standard_Transient)
#include <Graphic3d_MapIteratorOfMapOfStructure.hxx> #include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
#include <Graphic3d_CView.hxx> #include <Graphic3d_CView.hxx>
// ======================================================================== //=================================================================================================
// function : Graphic3d_StructureManager
// purpose :
// ========================================================================
Graphic3d_StructureManager::Graphic3d_StructureManager( Graphic3d_StructureManager::Graphic3d_StructureManager(
const Handle(Graphic3d_GraphicDriver)& theDriver) const Handle(Graphic3d_GraphicDriver)& theDriver)
: myViewGenId(0, 31), : myViewGenId(0, 31),
@ -37,10 +35,8 @@ Graphic3d_StructureManager::Graphic3d_StructureManager(
// //
} }
// ======================================================================== //=================================================================================================
// function : ~Graphic3d_StructureManager
// purpose :
// ========================================================================
Graphic3d_StructureManager::~Graphic3d_StructureManager() Graphic3d_StructureManager::~Graphic3d_StructureManager()
{ {
for (Graphic3d_MapIteratorOfMapOfStructure anIt(myDisplayedStructure); anIt.More(); anIt.Next()) for (Graphic3d_MapIteratorOfMapOfStructure anIt(myDisplayedStructure); anIt.More(); anIt.Next())
@ -53,10 +49,8 @@ Graphic3d_StructureManager::~Graphic3d_StructureManager()
myDefinedViews.Clear(); myDefinedViews.Clear();
} }
// ======================================================================== //=================================================================================================
// function : Update
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Update(const Graphic3d_ZLayerId theLayerId) const void Graphic3d_StructureManager::Update(const Graphic3d_ZLayerId theLayerId) const
{ {
for (Graphic3d_IndexedMapOfView::Iterator aViewIt(myDefinedViews); aViewIt.More(); aViewIt.Next()) for (Graphic3d_IndexedMapOfView::Iterator aViewIt(myDefinedViews); aViewIt.More(); aViewIt.Next())
@ -65,10 +59,8 @@ void Graphic3d_StructureManager::Update(const Graphic3d_ZLayerId theLayerId) con
} }
} }
// ======================================================================== //=================================================================================================
// function : Remove
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Remove() void Graphic3d_StructureManager::Remove()
{ {
// clear all structures whilst views are alive for correct GPU memory management // clear all structures whilst views are alive for correct GPU memory management
@ -83,10 +75,8 @@ void Graphic3d_StructureManager::Remove()
myDefinedViews.Clear(); myDefinedViews.Clear();
} }
// ======================================================================== //=================================================================================================
// function : Erase
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Erase() void Graphic3d_StructureManager::Erase()
{ {
for (Graphic3d_MapIteratorOfMapOfStructure anIt(myDisplayedStructure); anIt.More(); anIt.Next()) for (Graphic3d_MapIteratorOfMapOfStructure anIt(myDisplayedStructure); anIt.More(); anIt.Next())
@ -189,10 +179,8 @@ void Graphic3d_StructureManager::RecomputeStructures(
} }
} }
// ======================================================================== //=================================================================================================
// function : RegisterObject
// purpose :
// ========================================================================
void Graphic3d_StructureManager::RegisterObject(const Handle(Standard_Transient)& theObject, void Graphic3d_StructureManager::RegisterObject(const Handle(Standard_Transient)& theObject,
const Handle(Graphic3d_ViewAffinity)& theAffinity) const Handle(Graphic3d_ViewAffinity)& theAffinity)
{ {
@ -205,19 +193,15 @@ void Graphic3d_StructureManager::RegisterObject(const Handle(Standard_Transient)
myRegisteredObjects.Bind(theObject.operator->(), theAffinity); myRegisteredObjects.Bind(theObject.operator->(), theAffinity);
} }
// ======================================================================== //=================================================================================================
// function : UnregisterObject
// purpose :
// ========================================================================
void Graphic3d_StructureManager::UnregisterObject(const Handle(Standard_Transient)& theObject) void Graphic3d_StructureManager::UnregisterObject(const Handle(Standard_Transient)& theObject)
{ {
myRegisteredObjects.UnBind(theObject.operator->()); myRegisteredObjects.UnBind(theObject.operator->());
} }
// ======================================================================== //=================================================================================================
// function : ObjectAffinity
// purpose :
// ========================================================================
const Handle(Graphic3d_ViewAffinity)& Graphic3d_StructureManager::ObjectAffinity( const Handle(Graphic3d_ViewAffinity)& Graphic3d_StructureManager::ObjectAffinity(
const Handle(Standard_Transient)& theObject) const const Handle(Standard_Transient)& theObject) const
{ {
@ -230,10 +214,8 @@ const Handle(Graphic3d_ViewAffinity)& Graphic3d_StructureManager::ObjectAffinity
return *aResult; return *aResult;
} }
// ======================================================================== //=================================================================================================
// function : Identification
// purpose :
// ========================================================================
Standard_Integer Graphic3d_StructureManager::Identification(Graphic3d_CView* theView) Standard_Integer Graphic3d_StructureManager::Identification(Graphic3d_CView* theView)
{ {
if (myDefinedViews.Contains(theView)) if (myDefinedViews.Contains(theView))
@ -245,10 +227,8 @@ Standard_Integer Graphic3d_StructureManager::Identification(Graphic3d_CView* the
return myViewGenId.Next(); return myViewGenId.Next();
} }
// ======================================================================== //=================================================================================================
// function : UnIdentification
// purpose :
// ========================================================================
void Graphic3d_StructureManager::UnIdentification(Graphic3d_CView* theView) void Graphic3d_StructureManager::UnIdentification(Graphic3d_CView* theView)
{ {
if (myDefinedViews.Contains(theView)) if (myDefinedViews.Contains(theView))
@ -259,28 +239,22 @@ void Graphic3d_StructureManager::UnIdentification(Graphic3d_CView* theView)
} }
} }
// ======================================================================== //=================================================================================================
// function : DefinedViews
// purpose :
// ========================================================================
const Graphic3d_IndexedMapOfView& Graphic3d_StructureManager::DefinedViews() const const Graphic3d_IndexedMapOfView& Graphic3d_StructureManager::DefinedViews() const
{ {
return myDefinedViews; return myDefinedViews;
} }
// ======================================================================== //=================================================================================================
// function : MaxNumOfViews
// purpose :
// ========================================================================
Standard_Integer Graphic3d_StructureManager::MaxNumOfViews() const Standard_Integer Graphic3d_StructureManager::MaxNumOfViews() const
{ {
return myViewGenId.Upper() - myViewGenId.Lower() + 1; return myViewGenId.Upper() - myViewGenId.Lower() + 1;
} }
// ======================================================================== //=================================================================================================
// function : ReCompute
// purpose :
// ========================================================================
void Graphic3d_StructureManager::ReCompute(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_StructureManager::ReCompute(const Handle(Graphic3d_Structure)& theStructure)
{ {
if (!myDisplayedStructure.Contains(theStructure)) if (!myDisplayedStructure.Contains(theStructure))
@ -295,10 +269,8 @@ void Graphic3d_StructureManager::ReCompute(const Handle(Graphic3d_Structure)& th
} }
} }
// ======================================================================== //=================================================================================================
// function : ReCompute
// purpose :
// ========================================================================
void Graphic3d_StructureManager::ReCompute( void Graphic3d_StructureManager::ReCompute(
const Handle(Graphic3d_Structure)& theStructure, const Handle(Graphic3d_Structure)& theStructure,
const Handle(Graphic3d_DataStructureManager)& theProjector) const Handle(Graphic3d_DataStructureManager)& theProjector)
@ -314,10 +286,8 @@ void Graphic3d_StructureManager::ReCompute(
aView->ReCompute(theStructure); aView->ReCompute(theStructure);
} }
// ======================================================================== //=================================================================================================
// function : Clear
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Clear(Graphic3d_Structure* theStructure, void Graphic3d_StructureManager::Clear(Graphic3d_Structure* theStructure,
const Standard_Boolean theWithDestruction) const Standard_Boolean theWithDestruction)
{ {
@ -327,10 +297,8 @@ void Graphic3d_StructureManager::Clear(Graphic3d_Structure* theStructure,
} }
} }
// ======================================================================== //=================================================================================================
// function : Connect
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Connect(const Graphic3d_Structure* theMother, void Graphic3d_StructureManager::Connect(const Graphic3d_Structure* theMother,
const Graphic3d_Structure* theDaughter) const Graphic3d_Structure* theDaughter)
{ {
@ -340,10 +308,8 @@ void Graphic3d_StructureManager::Connect(const Graphic3d_Structure* theMother,
} }
} }
// ======================================================================== //=================================================================================================
// function : Disconnect
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Disconnect(const Graphic3d_Structure* theMother, void Graphic3d_StructureManager::Disconnect(const Graphic3d_Structure* theMother,
const Graphic3d_Structure* theDaughter) const Graphic3d_Structure* theDaughter)
{ {
@ -353,10 +319,8 @@ void Graphic3d_StructureManager::Disconnect(const Graphic3d_Structure* theMother
} }
} }
// ======================================================================== //=================================================================================================
// function : Display
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Display(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_StructureManager::Display(const Handle(Graphic3d_Structure)& theStructure)
{ {
myDisplayedStructure.Add(theStructure); myDisplayedStructure.Add(theStructure);
@ -367,10 +331,8 @@ void Graphic3d_StructureManager::Display(const Handle(Graphic3d_Structure)& theS
} }
} }
// ======================================================================== //=================================================================================================
// function : Erase
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Erase(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_StructureManager::Erase(const Handle(Graphic3d_Structure)& theStructure)
{ {
myDisplayedStructure.Remove(theStructure); myDisplayedStructure.Remove(theStructure);
@ -383,10 +345,8 @@ void Graphic3d_StructureManager::Erase(const Handle(Graphic3d_Structure)& theStr
} }
} }
// ======================================================================== //=================================================================================================
// function : Erase
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Highlight(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_StructureManager::Highlight(const Handle(Graphic3d_Structure)& theStructure)
{ {
myHighlightedStructure.Add(theStructure); myHighlightedStructure.Add(theStructure);
@ -398,10 +358,8 @@ void Graphic3d_StructureManager::Highlight(const Handle(Graphic3d_Structure)& th
} }
} }
// ======================================================================== //=================================================================================================
// function : UnHighlight
// purpose :
// ========================================================================
void Graphic3d_StructureManager::UnHighlight(const Handle(Graphic3d_Structure)& theStructure) void Graphic3d_StructureManager::UnHighlight(const Handle(Graphic3d_Structure)& theStructure)
{ {
myHighlightedStructure.Remove(theStructure); myHighlightedStructure.Remove(theStructure);
@ -413,10 +371,8 @@ void Graphic3d_StructureManager::UnHighlight(const Handle(Graphic3d_Structure)&
} }
} }
// ======================================================================== //=================================================================================================
// function : UnHighlight
// purpose :
// ========================================================================
void Graphic3d_StructureManager::UnHighlight() void Graphic3d_StructureManager::UnHighlight()
{ {
for (Graphic3d_MapIteratorOfMapOfStructure anIt(myHighlightedStructure); anIt.More(); anIt.Next()) for (Graphic3d_MapIteratorOfMapOfStructure anIt(myHighlightedStructure); anIt.More(); anIt.Next())
@ -425,10 +381,8 @@ void Graphic3d_StructureManager::UnHighlight()
} }
} }
// ======================================================================== //=================================================================================================
// function : SetTransform
// purpose :
// ========================================================================
void Graphic3d_StructureManager::SetTransform(const Handle(Graphic3d_Structure)& theStructure, void Graphic3d_StructureManager::SetTransform(const Handle(Graphic3d_Structure)& theStructure,
const Handle(TopLoc_Datum3D)& theTrsf) const Handle(TopLoc_Datum3D)& theTrsf)
{ {
@ -438,10 +392,8 @@ void Graphic3d_StructureManager::SetTransform(const Handle(Graphic3d_Structure)&
} }
} }
// ======================================================================== //=================================================================================================
// function : ChangeDisplayPriority
// purpose :
// ========================================================================
void Graphic3d_StructureManager::ChangeDisplayPriority( void Graphic3d_StructureManager::ChangeDisplayPriority(
const Handle(Graphic3d_Structure)& theStructure, const Handle(Graphic3d_Structure)& theStructure,
const Graphic3d_DisplayPriority theOldPriority, const Graphic3d_DisplayPriority theOldPriority,
@ -469,10 +421,8 @@ void Graphic3d_StructureManager::ChangeZLayer(const Handle(Graphic3d_Structure)&
} }
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_StructureManager::DumpJson(Standard_OStream& theOStream, void Graphic3d_StructureManager::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {

View File

@ -15,10 +15,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Text, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Text, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Text
// purpose :
// =======================================================================
Graphic3d_Text::Graphic3d_Text(const Standard_ShortReal theHeight) Graphic3d_Text::Graphic3d_Text(const Standard_ShortReal theHeight)
: myHeight(theHeight), : myHeight(theHeight),
myHAlign(Graphic3d_HTA_LEFT), myHAlign(Graphic3d_HTA_LEFT),
@ -28,20 +26,16 @@ Graphic3d_Text::Graphic3d_Text(const Standard_ShortReal theHeight)
{ {
} }
// ======================================================================= //=================================================================================================
// function : SetOrientation
// purpose :
// =======================================================================
void Graphic3d_Text::SetOrientation(const gp_Ax2& theOrientation) void Graphic3d_Text::SetOrientation(const gp_Ax2& theOrientation)
{ {
myOrientation = theOrientation; myOrientation = theOrientation;
myHasPlane = Standard_True; myHasPlane = Standard_True;
} }
// ======================================================================= //=================================================================================================
// function : ResetOrientation
// purpose :
// =======================================================================
void Graphic3d_Text::ResetOrientation() void Graphic3d_Text::ResetOrientation()
{ {
myOrientation = gp_Ax2(); myOrientation = gp_Ax2();

View File

@ -23,10 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1D, Graphic3d_TextureMap)
static const char* NameOfTexture1d_to_FileName[] = {"1d_elevation.rgb"}; static const char* NameOfTexture1d_to_FileName[] = {"1d_elevation.rgb"};
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1D
// purpose :
// =======================================================================
Graphic3d_Texture1D::Graphic3d_Texture1D(const TCollection_AsciiString& theFileName, Graphic3d_Texture1D::Graphic3d_Texture1D(const TCollection_AsciiString& theFileName,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureMap(theFileName, theType), : Graphic3d_TextureMap(theFileName, theType),
@ -34,10 +32,8 @@ Graphic3d_Texture1D::Graphic3d_Texture1D(const TCollection_AsciiString& theFileN
{ {
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1D
// purpose :
// =======================================================================
Graphic3d_Texture1D::Graphic3d_Texture1D(const Graphic3d_NameOfTexture1D theNOT, Graphic3d_Texture1D::Graphic3d_Texture1D(const Graphic3d_NameOfTexture1D theNOT,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureMap(NameOfTexture1d_to_FileName[theNOT], theType), : Graphic3d_TextureMap(NameOfTexture1d_to_FileName[theNOT], theType),
@ -47,10 +43,8 @@ Graphic3d_Texture1D::Graphic3d_Texture1D(const Graphic3d_NameOfTexture1D theNOT,
myTexId = TCollection_AsciiString("Graphic3d_Texture1D_") + NameOfTexture1d_to_FileName[theNOT]; myTexId = TCollection_AsciiString("Graphic3d_Texture1D_") + NameOfTexture1d_to_FileName[theNOT];
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1D
// purpose :
// =======================================================================
Graphic3d_Texture1D::Graphic3d_Texture1D(const Handle(Image_PixMap)& thePixMap, Graphic3d_Texture1D::Graphic3d_Texture1D(const Handle(Image_PixMap)& thePixMap,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureMap(thePixMap, theType), : Graphic3d_TextureMap(thePixMap, theType),
@ -58,28 +52,22 @@ Graphic3d_Texture1D::Graphic3d_Texture1D(const Handle(Image_PixMap)& thePixMap
{ {
} }
// ======================================================================= //=================================================================================================
// function : Name
// purpose :
// =======================================================================
Graphic3d_NameOfTexture1D Graphic3d_Texture1D::Name() const Graphic3d_NameOfTexture1D Graphic3d_Texture1D::Name() const
{ {
return myName; return myName;
} }
// ======================================================================= //=================================================================================================
// function : NumberOfTextures
// purpose :
// =======================================================================
Standard_Integer Graphic3d_Texture1D::NumberOfTextures() Standard_Integer Graphic3d_Texture1D::NumberOfTextures()
{ {
return sizeof(NameOfTexture1d_to_FileName) / sizeof(char*); return sizeof(NameOfTexture1d_to_FileName) / sizeof(char*);
} }
// ======================================================================= //=================================================================================================
// function : TextureName
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_Texture1D::TextureName(const Standard_Integer theRank) TCollection_AsciiString Graphic3d_Texture1D::TextureName(const Standard_Integer theRank)
{ {
if (theRank < 1 || theRank > NumberOfTextures()) if (theRank < 1 || theRank > NumberOfTextures())

View File

@ -20,30 +20,24 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dmanual, Graphic3d_Texture1D) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dmanual, Graphic3d_Texture1D)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1Dmanual
// purpose :
// =======================================================================
Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const TCollection_AsciiString& theFileName) Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const TCollection_AsciiString& theFileName)
: Graphic3d_Texture1D(theFileName, Graphic3d_TypeOfTexture_1D) : Graphic3d_Texture1D(theFileName, Graphic3d_TypeOfTexture_1D)
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1Dmanual
// purpose :
// =======================================================================
Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const Graphic3d_NameOfTexture1D theNOT) Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const Graphic3d_NameOfTexture1D theNOT)
: Graphic3d_Texture1D(theNOT, Graphic3d_TypeOfTexture_1D) : Graphic3d_Texture1D(theNOT, Graphic3d_TypeOfTexture_1D)
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1Dmanual
// purpose :
// =======================================================================
Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const Handle(Image_PixMap)& thePixMap) Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual(const Handle(Image_PixMap)& thePixMap)
: Graphic3d_Texture1D(thePixMap, Graphic3d_TypeOfTexture_1D) : Graphic3d_Texture1D(thePixMap, Graphic3d_TypeOfTexture_1D)
{ {

View File

@ -22,10 +22,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dsegment, Graphic3d_Texture1D) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dsegment, Graphic3d_Texture1D)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1Dsegment
// purpose :
// =======================================================================
Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const TCollection_AsciiString& theFileName) Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const TCollection_AsciiString& theFileName)
: Graphic3d_Texture1D(theFileName, Graphic3d_TypeOfTexture_1D), : Graphic3d_Texture1D(theFileName, Graphic3d_TypeOfTexture_1D),
myX1(0.0f), myX1(0.0f),
@ -41,10 +39,8 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const TCollection_AsciiSt
Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1Dsegment
// purpose :
// =======================================================================
Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTexture1D theNOT) Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTexture1D theNOT)
: Graphic3d_Texture1D(theNOT, Graphic3d_TypeOfTexture_1D), : Graphic3d_Texture1D(theNOT, Graphic3d_TypeOfTexture_1D),
myX1(0.0f), myX1(0.0f),
@ -60,10 +56,8 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTex
Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture1Dsegment
// purpose :
// =======================================================================
Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Handle(Image_PixMap)& thePixMap) Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Handle(Image_PixMap)& thePixMap)
: Graphic3d_Texture1D(thePixMap, Graphic3d_TypeOfTexture_1D), : Graphic3d_Texture1D(thePixMap, Graphic3d_TypeOfTexture_1D),
myX1(0.0f), myX1(0.0f),
@ -79,10 +73,8 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment(const Handle(Image_PixMap
Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : SetSegment
// purpose :
// =======================================================================
void Graphic3d_Texture1Dsegment::SetSegment(const Standard_ShortReal X1, void Graphic3d_Texture1Dsegment::SetSegment(const Standard_ShortReal X1,
const Standard_ShortReal Y1, const Standard_ShortReal Y1,
const Standard_ShortReal Z1, const Standard_ShortReal Z1,
@ -108,10 +100,8 @@ void Graphic3d_Texture1Dsegment::SetSegment(const Standard_ShortReal X1,
myParams->SetGenMode(Graphic3d_TOTM_OBJECT, aPlaneX, Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f)); myParams->SetGenMode(Graphic3d_TOTM_OBJECT, aPlaneX, Graphic3d_Vec4(0.0f, 0.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Segment
// purpose :
// =======================================================================
void Graphic3d_Texture1Dsegment::Segment(Standard_ShortReal& X1, void Graphic3d_Texture1Dsegment::Segment(Standard_ShortReal& X1,
Standard_ShortReal& Y1, Standard_ShortReal& Y1,
Standard_ShortReal& Z1, Standard_ShortReal& Z1,

View File

@ -44,10 +44,8 @@ static const char* NameOfTexture2d_to_FileName[] = {"2d_MatraDatavision.rgb",
"2d_rain.rgb", "2d_rain.rgb",
"2d_chess.rgba"}; "2d_chess.rgba"};
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2D
// purpose :
// =======================================================================
Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileName) Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileName)
: Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_2D), : Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_2D),
myName(Graphic3d_NOT_2D_UNKNOWN) myName(Graphic3d_NOT_2D_UNKNOWN)
@ -58,10 +56,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileN
myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); myParams->SetFilter(Graphic3d_TOTF_TRILINEAR);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2D
// purpose :
// =======================================================================
Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileName, Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileName,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureMap(theFileName, theType), : Graphic3d_TextureMap(theFileName, theType),
@ -70,10 +66,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const TCollection_AsciiString& theFileN
// //
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2D
// purpose :
// =======================================================================
Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT) Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT)
: Graphic3d_TextureMap(NameOfTexture2d_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D), : Graphic3d_TextureMap(NameOfTexture2d_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D),
myName(theNOT) myName(theNOT)
@ -87,10 +81,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT)
myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); myParams->SetFilter(Graphic3d_TOTF_TRILINEAR);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2D
// purpose :
// =======================================================================
Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT, Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureMap(NameOfTexture2d_to_FileName[theNOT], theType), : Graphic3d_TextureMap(NameOfTexture2d_to_FileName[theNOT], theType),
@ -100,10 +92,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Graphic3d_NameOfTexture2D theNOT,
myTexId = TCollection_AsciiString("Graphic3d_Texture2D_") + NameOfTexture2d_to_FileName[theNOT]; myTexId = TCollection_AsciiString("Graphic3d_Texture2D_") + NameOfTexture2d_to_FileName[theNOT];
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2D
// purpose :
// =======================================================================
Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap) Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap)
: Graphic3d_TextureMap(thePixMap, Graphic3d_TypeOfTexture_2D), : Graphic3d_TextureMap(thePixMap, Graphic3d_TypeOfTexture_2D),
myName(Graphic3d_NOT_2D_UNKNOWN) myName(Graphic3d_NOT_2D_UNKNOWN)
@ -114,10 +104,8 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap)
myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); myParams->SetFilter(Graphic3d_TOTF_TRILINEAR);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2D
// purpose :
// =======================================================================
Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap, Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureMap(thePixMap, theType), : Graphic3d_TextureMap(thePixMap, theType),
@ -126,28 +114,22 @@ Graphic3d_Texture2D::Graphic3d_Texture2D(const Handle(Image_PixMap)& thePixMap
// //
} }
// ======================================================================= //=================================================================================================
// function : NumberOfTextures
// purpose :
// =======================================================================
Standard_Integer Graphic3d_Texture2D::NumberOfTextures() Standard_Integer Graphic3d_Texture2D::NumberOfTextures()
{ {
return sizeof(NameOfTexture2d_to_FileName) / sizeof(char*); return sizeof(NameOfTexture2d_to_FileName) / sizeof(char*);
} }
// ======================================================================= //=================================================================================================
// function : Name
// purpose :
// =======================================================================
Graphic3d_NameOfTexture2D Graphic3d_Texture2D::Name() const Graphic3d_NameOfTexture2D Graphic3d_Texture2D::Name() const
{ {
return myName; return myName;
} }
// ======================================================================= //=================================================================================================
// function : TextureName
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_Texture2D::TextureName(const Standard_Integer theRank) TCollection_AsciiString Graphic3d_Texture2D::TextureName(const Standard_Integer theRank)
{ {
if (theRank < 1 || theRank > NumberOfTextures()) if (theRank < 1 || theRank > NumberOfTextures())
@ -160,10 +142,8 @@ TCollection_AsciiString Graphic3d_Texture2D::TextureName(const Standard_Integer
return aFileName.SubString(4, i - 1); return aFileName.SubString(4, i - 1);
} }
// ======================================================================= //=================================================================================================
// function : SetImage
// purpose :
// =======================================================================
void Graphic3d_Texture2D::SetImage(const Handle(Image_PixMap)& thePixMap) void Graphic3d_Texture2D::SetImage(const Handle(Image_PixMap)& thePixMap)
{ {
myPixMap = thePixMap; myPixMap = thePixMap;

View File

@ -22,10 +22,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture2Dplane, Graphic3d_Texture2D) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture2Dplane, Graphic3d_Texture2D)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2Dplane
// purpose :
// =======================================================================
Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const TCollection_AsciiString& theFileName) Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const TCollection_AsciiString& theFileName)
: Graphic3d_Texture2D(theFileName) : Graphic3d_Texture2D(theFileName)
{ {
@ -34,10 +32,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const TCollection_AsciiString
Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2Dplane
// purpose :
// =======================================================================
Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Graphic3d_NameOfTexture2D theNOT) Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Graphic3d_NameOfTexture2D theNOT)
: Graphic3d_Texture2D(theNOT) : Graphic3d_Texture2D(theNOT)
{ {
@ -46,10 +42,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Graphic3d_NameOfTexture
Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture2Dplane
// purpose :
// =======================================================================
Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Handle(Image_PixMap)& thePixMap) Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Handle(Image_PixMap)& thePixMap)
: Graphic3d_Texture2D(thePixMap) : Graphic3d_Texture2D(thePixMap)
{ {
@ -58,10 +52,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane(const Handle(Image_PixMap)& t
Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : SetPlaneS
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetPlaneS(const Standard_ShortReal theA, void Graphic3d_Texture2Dplane::SetPlaneS(const Standard_ShortReal theA,
const Standard_ShortReal theB, const Standard_ShortReal theB,
const Standard_ShortReal theC, const Standard_ShortReal theC,
@ -73,10 +65,8 @@ void Graphic3d_Texture2Dplane::SetPlaneS(const Standard_ShortReal theA,
myPlaneName = Graphic3d_NOTP_UNKNOWN; myPlaneName = Graphic3d_NOTP_UNKNOWN;
} }
// ======================================================================= //=================================================================================================
// function : SetPlaneT
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetPlaneT(const Standard_ShortReal theA, void Graphic3d_Texture2Dplane::SetPlaneT(const Standard_ShortReal theA,
const Standard_ShortReal theB, const Standard_ShortReal theB,
const Standard_ShortReal theC, const Standard_ShortReal theC,
@ -88,10 +78,8 @@ void Graphic3d_Texture2Dplane::SetPlaneT(const Standard_ShortReal theA,
myPlaneName = Graphic3d_NOTP_UNKNOWN; myPlaneName = Graphic3d_NOTP_UNKNOWN;
} }
// ======================================================================= //=================================================================================================
// function : SetPlane
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetPlane(const Graphic3d_NameOfTexturePlane thePlane) void Graphic3d_Texture2Dplane::SetPlane(const Graphic3d_NameOfTexturePlane thePlane)
{ {
switch (thePlane) switch (thePlane)
@ -121,10 +109,8 @@ void Graphic3d_Texture2Dplane::SetPlane(const Graphic3d_NameOfTexturePlane thePl
myPlaneName = thePlane; myPlaneName = thePlane;
} }
// ======================================================================= //=================================================================================================
// function : SetScaleS
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetScaleS(const Standard_ShortReal theVal) void Graphic3d_Texture2Dplane::SetScaleS(const Standard_ShortReal theVal)
{ {
Graphic3d_Vec2 aScale = myParams->Scale(); Graphic3d_Vec2 aScale = myParams->Scale();
@ -132,10 +118,8 @@ void Graphic3d_Texture2Dplane::SetScaleS(const Standard_ShortReal theVal)
myParams->SetScale(aScale); myParams->SetScale(aScale);
} }
// ======================================================================= //=================================================================================================
// function : SetScaleT
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetScaleT(const Standard_ShortReal theVal) void Graphic3d_Texture2Dplane::SetScaleT(const Standard_ShortReal theVal)
{ {
Graphic3d_Vec2 aScale = myParams->Scale(); Graphic3d_Vec2 aScale = myParams->Scale();
@ -143,10 +127,8 @@ void Graphic3d_Texture2Dplane::SetScaleT(const Standard_ShortReal theVal)
myParams->SetScale(aScale); myParams->SetScale(aScale);
} }
// ======================================================================= //=================================================================================================
// function : SetTranslateS
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetTranslateS(const Standard_ShortReal theVal) void Graphic3d_Texture2Dplane::SetTranslateS(const Standard_ShortReal theVal)
{ {
Graphic3d_Vec2 aVec = myParams->Translation(); Graphic3d_Vec2 aVec = myParams->Translation();
@ -154,10 +136,8 @@ void Graphic3d_Texture2Dplane::SetTranslateS(const Standard_ShortReal theVal)
myParams->SetTranslation(aVec); myParams->SetTranslation(aVec);
} }
// ======================================================================= //=================================================================================================
// function : SetTranslateT
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetTranslateT(const Standard_ShortReal theVal) void Graphic3d_Texture2Dplane::SetTranslateT(const Standard_ShortReal theVal)
{ {
Graphic3d_Vec2 aVec = myParams->Translation(); Graphic3d_Vec2 aVec = myParams->Translation();
@ -165,19 +145,15 @@ void Graphic3d_Texture2Dplane::SetTranslateT(const Standard_ShortReal theVal)
myParams->SetTranslation(aVec); myParams->SetTranslation(aVec);
} }
// ======================================================================= //=================================================================================================
// function : SetRotation
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::SetRotation(const Standard_ShortReal theAngleDegrees) void Graphic3d_Texture2Dplane::SetRotation(const Standard_ShortReal theAngleDegrees)
{ {
myParams->SetRotation(theAngleDegrees); myParams->SetRotation(theAngleDegrees);
} }
// ======================================================================= //=================================================================================================
// function : PlaneS
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::PlaneS(Standard_ShortReal& theA, void Graphic3d_Texture2Dplane::PlaneS(Standard_ShortReal& theA,
Standard_ShortReal& theB, Standard_ShortReal& theB,
Standard_ShortReal& theC, Standard_ShortReal& theC,
@ -190,10 +166,8 @@ void Graphic3d_Texture2Dplane::PlaneS(Standard_ShortReal& theA,
theD = aPlaneS.w(); theD = aPlaneS.w();
} }
// ======================================================================= //=================================================================================================
// function : PlaneT
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::PlaneT(Standard_ShortReal& theA, void Graphic3d_Texture2Dplane::PlaneT(Standard_ShortReal& theA,
Standard_ShortReal& theB, Standard_ShortReal& theB,
Standard_ShortReal& theC, Standard_ShortReal& theC,
@ -206,55 +180,43 @@ void Graphic3d_Texture2Dplane::PlaneT(Standard_ShortReal& theA,
theD = aPlaneT.w(); theD = aPlaneT.w();
} }
// ======================================================================= //=================================================================================================
// function : TranslateS
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::TranslateS(Standard_ShortReal& theVal) const void Graphic3d_Texture2Dplane::TranslateS(Standard_ShortReal& theVal) const
{ {
theVal = myParams->Translation().x(); theVal = myParams->Translation().x();
} }
// ======================================================================= //=================================================================================================
// function : TranslateT
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::TranslateT(Standard_ShortReal& theVal) const void Graphic3d_Texture2Dplane::TranslateT(Standard_ShortReal& theVal) const
{ {
theVal = myParams->Translation().y(); theVal = myParams->Translation().y();
} }
// ======================================================================= //=================================================================================================
// function : Rotation
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::Rotation(Standard_ShortReal& theVal) const void Graphic3d_Texture2Dplane::Rotation(Standard_ShortReal& theVal) const
{ {
theVal = myParams->Rotation(); theVal = myParams->Rotation();
} }
// ======================================================================= //=================================================================================================
// function : Plane
// purpose :
// =======================================================================
Graphic3d_NameOfTexturePlane Graphic3d_Texture2Dplane::Plane() const Graphic3d_NameOfTexturePlane Graphic3d_Texture2Dplane::Plane() const
{ {
return myPlaneName; return myPlaneName;
} }
// ======================================================================= //=================================================================================================
// function : ScaleS
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::ScaleS(Standard_ShortReal& theVal) const void Graphic3d_Texture2Dplane::ScaleS(Standard_ShortReal& theVal) const
{ {
theVal = myParams->Scale().x(); theVal = myParams->Scale().x();
} }
// ======================================================================= //=================================================================================================
// function : ScaleT
// purpose :
// =======================================================================
void Graphic3d_Texture2Dplane::ScaleT(Standard_ShortReal& theVal) const void Graphic3d_Texture2Dplane::ScaleT(Standard_ShortReal& theVal) const
{ {
theVal = myParams->Scale().y(); theVal = myParams->Scale().y();

View File

@ -19,30 +19,24 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture3D, Graphic3d_TextureMap) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture3D, Graphic3d_TextureMap)
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture3D
// purpose :
// =======================================================================
Graphic3d_Texture3D::Graphic3d_Texture3D(const TCollection_AsciiString& theFileName) Graphic3d_Texture3D::Graphic3d_Texture3D(const TCollection_AsciiString& theFileName)
: Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_3D) : Graphic3d_TextureMap(theFileName, Graphic3d_TypeOfTexture_3D)
{ {
myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); myParams->SetFilter(Graphic3d_TOTF_TRILINEAR);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture3D
// purpose :
// =======================================================================
Graphic3d_Texture3D::Graphic3d_Texture3D(const Handle(Image_PixMap)& thePixMap) Graphic3d_Texture3D::Graphic3d_Texture3D(const Handle(Image_PixMap)& thePixMap)
: Graphic3d_TextureMap(thePixMap, Graphic3d_TypeOfTexture_3D) : Graphic3d_TextureMap(thePixMap, Graphic3d_TypeOfTexture_3D)
{ {
myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); myParams->SetFilter(Graphic3d_TOTF_TRILINEAR);
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_Texture3D
// purpose :
// =======================================================================
Graphic3d_Texture3D::Graphic3d_Texture3D( Graphic3d_Texture3D::Graphic3d_Texture3D(
const NCollection_Array1<TCollection_AsciiString>& theFiles) const NCollection_Array1<TCollection_AsciiString>& theFiles)
: Graphic3d_TextureMap("", Graphic3d_TypeOfTexture_3D) : Graphic3d_TextureMap("", Graphic3d_TypeOfTexture_3D)
@ -52,19 +46,15 @@ Graphic3d_Texture3D::Graphic3d_Texture3D(
myPaths.Assign(theFiles); myPaths.Assign(theFiles);
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_Texture3D
// purpose :
// =======================================================================
Graphic3d_Texture3D::~Graphic3d_Texture3D() Graphic3d_Texture3D::~Graphic3d_Texture3D()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : SetImage
// purpose :
// =======================================================================
void Graphic3d_Texture3D::SetImage(const Handle(Image_PixMap)& thePixMap) void Graphic3d_Texture3D::SetImage(const Handle(Image_PixMap)& thePixMap)
{ {
myPixMap = thePixMap; myPixMap = thePixMap;
@ -74,10 +64,8 @@ void Graphic3d_Texture3D::SetImage(const Handle(Image_PixMap)& thePixMap)
myPaths.Move(anArr); myPaths.Move(anArr);
} }
// ======================================================================= //=================================================================================================
// function : GetImage
// purpose :
// =======================================================================
Handle(Image_PixMap) Graphic3d_Texture3D::GetImage( Handle(Image_PixMap) Graphic3d_Texture3D::GetImage(
const Handle(Image_SupportedFormats)& theSupported) const Handle(Image_SupportedFormats)& theSupported)
{ {

View File

@ -33,10 +33,8 @@ static const char* NameOfTextureEnv_to_FileName[] = {"env_clouds.rgb",
"env_lines.rgb", "env_lines.rgb",
"env_road.rgb"}; "env_road.rgb"};
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureEnv
// purpose :
// =======================================================================
Graphic3d_TextureEnv::Graphic3d_TextureEnv(const TCollection_AsciiString& theFileName) Graphic3d_TextureEnv::Graphic3d_TextureEnv(const TCollection_AsciiString& theFileName)
: Graphic3d_TextureRoot(theFileName, Graphic3d_TypeOfTexture_2D), : Graphic3d_TextureRoot(theFileName, Graphic3d_TypeOfTexture_2D),
myName(Graphic3d_NOT_ENV_UNKNOWN) myName(Graphic3d_NOT_ENV_UNKNOWN)
@ -48,10 +46,8 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv(const TCollection_AsciiString& theFil
Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureEnv
// purpose :
// =======================================================================
Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Graphic3d_NameOfTextureEnv theNOT) Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Graphic3d_NameOfTextureEnv theNOT)
: Graphic3d_TextureRoot(NameOfTextureEnv_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D), : Graphic3d_TextureRoot(NameOfTextureEnv_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D),
myName(theNOT) myName(theNOT)
@ -66,10 +62,8 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Graphic3d_NameOfTextureEnv theN
Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureEnv
// purpose :
// =======================================================================
Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Handle(Image_PixMap)& thePixMap) Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Handle(Image_PixMap)& thePixMap)
: Graphic3d_TextureRoot(thePixMap, Graphic3d_TypeOfTexture_2D), : Graphic3d_TextureRoot(thePixMap, Graphic3d_TypeOfTexture_2D),
myName(Graphic3d_NOT_ENV_UNKNOWN) myName(Graphic3d_NOT_ENV_UNKNOWN)
@ -81,28 +75,22 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv(const Handle(Image_PixMap)& thePixMap
Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f)); Graphic3d_Vec4(0.0f, 1.0f, 0.0f, 0.0f));
} }
// ======================================================================= //=================================================================================================
// function : Name
// purpose :
// =======================================================================
Graphic3d_NameOfTextureEnv Graphic3d_TextureEnv::Name() const Graphic3d_NameOfTextureEnv Graphic3d_TextureEnv::Name() const
{ {
return myName; return myName;
} }
// ======================================================================= //=================================================================================================
// function : NumberOfTextures
// purpose :
// =======================================================================
Standard_Integer Graphic3d_TextureEnv::NumberOfTextures() Standard_Integer Graphic3d_TextureEnv::NumberOfTextures()
{ {
return sizeof(NameOfTextureEnv_to_FileName) / sizeof(char*); return sizeof(NameOfTextureEnv_to_FileName) / sizeof(char*);
} }
// ======================================================================= //=================================================================================================
// function : TextureName
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_TextureEnv::TextureName(const Standard_Integer theRank) TCollection_AsciiString Graphic3d_TextureEnv::TextureName(const Standard_Integer theRank)
{ {
if (theRank < 1 || theRank > NumberOfTextures()) if (theRank < 1 || theRank > NumberOfTextures())

View File

@ -21,120 +21,94 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureMap, Graphic3d_TextureRoot) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureMap, Graphic3d_TextureRoot)
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureMap
// purpose :
// =======================================================================
Graphic3d_TextureMap::Graphic3d_TextureMap(const TCollection_AsciiString& theFileName, Graphic3d_TextureMap::Graphic3d_TextureMap(const TCollection_AsciiString& theFileName,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureRoot(theFileName, theType) : Graphic3d_TextureRoot(theFileName, theType)
{ {
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureMap
// purpose :
// =======================================================================
Graphic3d_TextureMap::Graphic3d_TextureMap(const Handle(Image_PixMap)& thePixMap, Graphic3d_TextureMap::Graphic3d_TextureMap(const Handle(Image_PixMap)& thePixMap,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: Graphic3d_TextureRoot(thePixMap, theType) : Graphic3d_TextureRoot(thePixMap, theType)
{ {
} }
// ======================================================================= //=================================================================================================
// function : EnableSmooth
// purpose :
// =======================================================================
void Graphic3d_TextureMap::EnableSmooth() void Graphic3d_TextureMap::EnableSmooth()
{ {
myParams->SetFilter(Graphic3d_TOTF_TRILINEAR); myParams->SetFilter(Graphic3d_TOTF_TRILINEAR);
} }
// ======================================================================= //=================================================================================================
// function : DisableSmooth
// purpose :
// =======================================================================
void Graphic3d_TextureMap::DisableSmooth() void Graphic3d_TextureMap::DisableSmooth()
{ {
myParams->SetFilter(Graphic3d_TOTF_NEAREST); myParams->SetFilter(Graphic3d_TOTF_NEAREST);
} }
// ======================================================================= //=================================================================================================
// function : IsSmoothed
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_TextureMap::IsSmoothed() const Standard_Boolean Graphic3d_TextureMap::IsSmoothed() const
{ {
return myParams->Filter() != Graphic3d_TOTF_NEAREST; return myParams->Filter() != Graphic3d_TOTF_NEAREST;
} }
// ======================================================================= //=================================================================================================
// function : EnableModulate
// purpose :
// =======================================================================
void Graphic3d_TextureMap::EnableModulate() void Graphic3d_TextureMap::EnableModulate()
{ {
myParams->SetModulate(Standard_True); myParams->SetModulate(Standard_True);
} }
// ======================================================================= //=================================================================================================
// function : DisableModulate
// purpose :
// =======================================================================
void Graphic3d_TextureMap::DisableModulate() void Graphic3d_TextureMap::DisableModulate()
{ {
myParams->SetModulate(Standard_False); myParams->SetModulate(Standard_False);
} }
// ======================================================================= //=================================================================================================
// function : IsModulate
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_TextureMap::IsModulate() const Standard_Boolean Graphic3d_TextureMap::IsModulate() const
{ {
return myParams->IsModulate(); return myParams->IsModulate();
} }
// ======================================================================= //=================================================================================================
// function : EnableRepeat
// purpose :
// =======================================================================
void Graphic3d_TextureMap::EnableRepeat() void Graphic3d_TextureMap::EnableRepeat()
{ {
myParams->SetRepeat(Standard_True); myParams->SetRepeat(Standard_True);
} }
// ======================================================================= //=================================================================================================
// function : DisableRepeat
// purpose :
// =======================================================================
void Graphic3d_TextureMap::DisableRepeat() void Graphic3d_TextureMap::DisableRepeat()
{ {
myParams->SetRepeat(Standard_False); myParams->SetRepeat(Standard_False);
} }
// ======================================================================= //=================================================================================================
// function : IsRepeat
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_TextureMap::IsRepeat() const Standard_Boolean Graphic3d_TextureMap::IsRepeat() const
{ {
return myParams->IsRepeat(); return myParams->IsRepeat();
} }
// ======================================================================= //=================================================================================================
// function : AnisoFilter
// purpose :
// =======================================================================
Graphic3d_LevelOfTextureAnisotropy Graphic3d_TextureMap::AnisoFilter() const Graphic3d_LevelOfTextureAnisotropy Graphic3d_TextureMap::AnisoFilter() const
{ {
return myParams->AnisoFilter(); return myParams->AnisoFilter();
} }
// ======================================================================= //=================================================================================================
// function : SetAnisoFilter
// purpose :
// =======================================================================
void Graphic3d_TextureMap::SetAnisoFilter(const Graphic3d_LevelOfTextureAnisotropy theLevel) void Graphic3d_TextureMap::SetAnisoFilter(const Graphic3d_LevelOfTextureAnisotropy theLevel)
{ {
myParams->SetAnisoFilter(theLevel); myParams->SetAnisoFilter(theLevel);

View File

@ -15,10 +15,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureParams, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureParams, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureParams
// purpose :
// =======================================================================
Graphic3d_TextureParams::Graphic3d_TextureParams() Graphic3d_TextureParams::Graphic3d_TextureParams()
: myGenPlaneS(0.0f, 0.0f, 0.0f, 0.0f), : myGenPlaneS(0.0f, 0.0f, 0.0f, 0.0f),
myGenPlaneT(0.0f, 0.0f, 0.0f, 0.0f), myGenPlaneT(0.0f, 0.0f, 0.0f, 0.0f),
@ -38,28 +36,22 @@ Graphic3d_TextureParams::Graphic3d_TextureParams()
// //
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_TextureParams
// purpose :
// =======================================================================
Graphic3d_TextureParams::~Graphic3d_TextureParams() Graphic3d_TextureParams::~Graphic3d_TextureParams()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : SetModulate
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetModulate(const Standard_Boolean theToModulate) void Graphic3d_TextureParams::SetModulate(const Standard_Boolean theToModulate)
{ {
myToModulate = theToModulate; myToModulate = theToModulate;
} }
// ======================================================================= //=================================================================================================
// function : SetRepeat
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetRepeat(const Standard_Boolean theToRepeat) void Graphic3d_TextureParams::SetRepeat(const Standard_Boolean theToRepeat)
{ {
if (myToRepeat != theToRepeat) if (myToRepeat != theToRepeat)
@ -69,10 +61,8 @@ void Graphic3d_TextureParams::SetRepeat(const Standard_Boolean theToRepeat)
} }
} }
// ======================================================================= //=================================================================================================
// function : SetFilter
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetFilter(const Graphic3d_TypeOfTextureFilter theFilter) void Graphic3d_TextureParams::SetFilter(const Graphic3d_TypeOfTextureFilter theFilter)
{ {
if (myFilter != theFilter) if (myFilter != theFilter)
@ -82,10 +72,8 @@ void Graphic3d_TextureParams::SetFilter(const Graphic3d_TypeOfTextureFilter theF
} }
} }
// ======================================================================= //=================================================================================================
// function : SetAnisoFilter
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetAnisoFilter(const Graphic3d_LevelOfTextureAnisotropy theLevel) void Graphic3d_TextureParams::SetAnisoFilter(const Graphic3d_LevelOfTextureAnisotropy theLevel)
{ {
if (myAnisoLevel != theLevel) if (myAnisoLevel != theLevel)
@ -95,37 +83,29 @@ void Graphic3d_TextureParams::SetAnisoFilter(const Graphic3d_LevelOfTextureAniso
} }
} }
// ======================================================================= //=================================================================================================
// function : SetRotation
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetRotation(const Standard_ShortReal theAngleDegrees) void Graphic3d_TextureParams::SetRotation(const Standard_ShortReal theAngleDegrees)
{ {
myRotAngle = theAngleDegrees; myRotAngle = theAngleDegrees;
} }
// ======================================================================= //=================================================================================================
// function : SetScale
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetScale(const Graphic3d_Vec2 theScale) void Graphic3d_TextureParams::SetScale(const Graphic3d_Vec2 theScale)
{ {
myScale = theScale; myScale = theScale;
} }
// ======================================================================= //=================================================================================================
// function : SetTranslation
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetTranslation(const Graphic3d_Vec2 theVec) void Graphic3d_TextureParams::SetTranslation(const Graphic3d_Vec2 theVec)
{ {
myTranslation = theVec; myTranslation = theVec;
} }
// ======================================================================= //=================================================================================================
// function : SetGenMode
// purpose :
// =======================================================================
void Graphic3d_TextureParams::SetGenMode(const Graphic3d_TypeOfTextureMode theMode, void Graphic3d_TextureParams::SetGenMode(const Graphic3d_TypeOfTextureMode theMode,
const Graphic3d_Vec4 thePlaneS, const Graphic3d_Vec4 thePlaneS,
const Graphic3d_Vec4 thePlaneT) const Graphic3d_Vec4 thePlaneT)

View File

@ -34,10 +34,8 @@ namespace
static volatile Standard_Integer THE_TEXTURE_COUNTER = 0; static volatile Standard_Integer THE_TEXTURE_COUNTER = 0;
} }
// ======================================================================= //=================================================================================================
// function : TexturesFolder
// purpose :
// =======================================================================
TCollection_AsciiString Graphic3d_TextureRoot::TexturesFolder() TCollection_AsciiString Graphic3d_TextureRoot::TexturesFolder()
{ {
static Standard_Boolean IsDefined = Standard_False; static Standard_Boolean IsDefined = Standard_False;
@ -83,10 +81,8 @@ TCollection_AsciiString Graphic3d_TextureRoot::TexturesFolder()
return VarName; return VarName;
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureRoot
// purpose :
// =======================================================================
Graphic3d_TextureRoot::Graphic3d_TextureRoot(const TCollection_AsciiString& theFileName, Graphic3d_TextureRoot::Graphic3d_TextureRoot(const TCollection_AsciiString& theFileName,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: myParams(new Graphic3d_TextureParams()), : myParams(new Graphic3d_TextureParams()),
@ -100,10 +96,8 @@ Graphic3d_TextureRoot::Graphic3d_TextureRoot(const TCollection_AsciiString& theF
generateId(); generateId();
} }
// ======================================================================= //=================================================================================================
// function : Graphic3d_TextureRoot
// purpose :
// =======================================================================
Graphic3d_TextureRoot::Graphic3d_TextureRoot(const Handle(Image_PixMap)& thePixMap, Graphic3d_TextureRoot::Graphic3d_TextureRoot(const Handle(Image_PixMap)& thePixMap,
const Graphic3d_TypeOfTexture theType) const Graphic3d_TypeOfTexture theType)
: myParams(new Graphic3d_TextureParams()), : myParams(new Graphic3d_TextureParams()),
@ -117,29 +111,23 @@ Graphic3d_TextureRoot::Graphic3d_TextureRoot(const Handle(Image_PixMap)& thePi
generateId(); generateId();
} }
// ======================================================================= //=================================================================================================
// function : ~Graphic3d_TextureRoot
// purpose :
// =======================================================================
Graphic3d_TextureRoot::~Graphic3d_TextureRoot() Graphic3d_TextureRoot::~Graphic3d_TextureRoot()
{ {
// //
} }
// ======================================================================= //=================================================================================================
// function : generateId
// purpose :
// =======================================================================
void Graphic3d_TextureRoot::generateId() void Graphic3d_TextureRoot::generateId()
{ {
myTexId = TCollection_AsciiString("Graphic3d_TextureRoot_") myTexId = TCollection_AsciiString("Graphic3d_TextureRoot_")
+ TCollection_AsciiString(Standard_Atomic_Increment(&THE_TEXTURE_COUNTER)); + TCollection_AsciiString(Standard_Atomic_Increment(&THE_TEXTURE_COUNTER));
} }
// ======================================================================= //=================================================================================================
// function : GetCompressedImage
// purpose :
// =======================================================================
Handle(Image_CompressedPixMap) Graphic3d_TextureRoot::GetCompressedImage( Handle(Image_CompressedPixMap) Graphic3d_TextureRoot::GetCompressedImage(
const Handle(Image_SupportedFormats)& theSupported) const Handle(Image_SupportedFormats)& theSupported)
{ {
@ -172,10 +160,8 @@ Handle(Image_CompressedPixMap) Graphic3d_TextureRoot::GetCompressedImage(
return Handle(Image_CompressedPixMap)(); return Handle(Image_CompressedPixMap)();
} }
// ======================================================================= //=================================================================================================
// function : GetImage
// purpose :
// =======================================================================
Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage( Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage(
const Handle(Image_SupportedFormats)& theSupported) const Handle(Image_SupportedFormats)& theSupported)
{ {
@ -211,10 +197,8 @@ Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage(
return Handle(Image_PixMap)(); return Handle(Image_PixMap)();
} }
// ======================================================================= //=================================================================================================
// function : convertToCompatible
// purpose :
// =======================================================================
void Graphic3d_TextureRoot::convertToCompatible(const Handle(Image_SupportedFormats)& theSupported, void Graphic3d_TextureRoot::convertToCompatible(const Handle(Image_SupportedFormats)& theSupported,
const Handle(Image_PixMap)& theImage) const Handle(Image_PixMap)& theImage)
{ {
@ -241,10 +225,8 @@ void Graphic3d_TextureRoot::convertToCompatible(const Handle(Image_SupportedForm
} }
} }
// ======================================================================= //=================================================================================================
// function : IsDone
// purpose :
// =======================================================================
Standard_Boolean Graphic3d_TextureRoot::IsDone() const Standard_Boolean Graphic3d_TextureRoot::IsDone() const
{ {
// Case 1: texture source is specified as pixmap // Case 1: texture source is specified as pixmap

View File

@ -15,10 +15,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TransformPers, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TransformPers, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_TransformPers::PersParams3d::DumpJson(Standard_OStream& theOStream, void Graphic3d_TransformPers::PersParams3d::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {
@ -26,10 +24,8 @@ void Graphic3d_TransformPers::PersParams3d::DumpJson(Standard_OStream& theOStrea
OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, &anAttachPoint) OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, &anAttachPoint)
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_TransformPers::PersParams2d::DumpJson(Standard_OStream& theOStream, void Graphic3d_TransformPers::PersParams2d::DumpJson(Standard_OStream& theOStream,
Standard_Integer) const Standard_Integer) const
{ {
@ -38,10 +34,8 @@ void Graphic3d_TransformPers::PersParams2d::DumpJson(Standard_OStream& theOStrea
OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, Corner) OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, Corner)
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_TransformPers::DumpJson(Standard_OStream& theOStream, void Graphic3d_TransformPers::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const Standard_Integer theDepth) const
{ {

View File

@ -15,10 +15,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TransformPersScaledAbove, Graphic3d_TransformPers) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TransformPersScaledAbove, Graphic3d_TransformPers)
// ======================================================================= //=================================================================================================
// function : Graphic3d_TransformPersScaledAbove
// purpose :
// =======================================================================
Graphic3d_TransformPersScaledAbove::Graphic3d_TransformPersScaledAbove(const Standard_Real theScale, Graphic3d_TransformPersScaledAbove::Graphic3d_TransformPersScaledAbove(const Standard_Real theScale,
const gp_Pnt& thePnt) const gp_Pnt& thePnt)
: Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers, thePnt), : Graphic3d_TransformPers(Graphic3d_TMF_ZoomPers, thePnt),
@ -26,10 +24,8 @@ Graphic3d_TransformPersScaledAbove::Graphic3d_TransformPersScaledAbove(const Sta
{ {
} }
// ======================================================================= //=================================================================================================
// function : persistentScale
// purpose :
// =======================================================================
Standard_Real Graphic3d_TransformPersScaledAbove::persistentScale( Standard_Real Graphic3d_TransformPersScaledAbove::persistentScale(
const Handle(Graphic3d_Camera)& theCamera, const Handle(Graphic3d_Camera)& theCamera,
const Standard_Integer theViewportWidth, const Standard_Integer theViewportWidth,

View File

@ -26,10 +26,8 @@ Standard_ShortReal Graphic3d_Vertex::Distance(const Graphic3d_Vertex& AOther) co
+ (Z() - AOther.Z()) * (Z() - AOther.Z())); + (Z() - AOther.Z()) * (Z() - AOther.Z()));
} }
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_Vertex::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const void Graphic3d_Vertex::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
gp_XYZ aCoord(xyz[0], xyz[1], xyz[2]); gp_XYZ aCoord(xyz[0], xyz[1], xyz[2]);

View File

@ -19,10 +19,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ViewAffinity, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ViewAffinity, Standard_Transient)
// ======================================================================= //=================================================================================================
// function : DumpJson
// purpose :
// =======================================================================
void Graphic3d_ViewAffinity::DumpJson(Standard_OStream& theOStream, Standard_Integer) const void Graphic3d_ViewAffinity::DumpJson(Standard_OStream& theOStream, Standard_Integer) const
{ {
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)

View File

@ -17,10 +17,8 @@
IMPLEMENT_STANDARD_RTTIEXT(IVtk_IShapeMesher, IVtk_Interface) IMPLEMENT_STANDARD_RTTIEXT(IVtk_IShapeMesher, IVtk_Interface)
// ================================================================ //=================================================================================================
// Function : initialize
// Purpose :
// ================================================================
void IVtk_IShapeMesher::initialize(const IVtk_IShape::Handle& theShape, void IVtk_IShapeMesher::initialize(const IVtk_IShape::Handle& theShape,
const IVtk_IShapeData::Handle& theData) const IVtk_IShapeData::Handle& theData)
{ {
@ -28,10 +26,8 @@ void IVtk_IShapeMesher::initialize(const IVtk_IShape::Handle& theShape,
myShapeData = theData; myShapeData = theData;
} }
// ================================================================ //=================================================================================================
// Function : Build
// Purpose :
// ================================================================
void IVtk_IShapeMesher::Build(const IVtk_IShape::Handle& theShape, void IVtk_IShapeMesher::Build(const IVtk_IShape::Handle& theShape,
const IVtk_IShapeData::Handle& theData) const IVtk_IShapeData::Handle& theData)
{ {

View File

@ -86,10 +86,8 @@ static void ClearHighlightAndSelection(const Handle(ShapePipelineMap)& theMap,
vtkStandardNewMacro(IVtkDraw_Interactor) vtkStandardNewMacro(IVtkDraw_Interactor)
//=========================================================== //=================================================================================================
// Function : Constructor
// Purpose :
//===========================================================
IVtkDraw_Interactor::IVtkDraw_Interactor() IVtkDraw_Interactor::IVtkDraw_Interactor()
: :
#ifdef _WIN32 #ifdef _WIN32

View File

@ -36,10 +36,8 @@
vtkStandardNewMacro(IVtkTools_ShapeDataSource) vtkStandardNewMacro(IVtkTools_ShapeDataSource)
//================================================================ //=================================================================================================
// Function : Constructor
// Purpose :
//================================================================
IVtkTools_ShapeDataSource::IVtkTools_ShapeDataSource() IVtkTools_ShapeDataSource::IVtkTools_ShapeDataSource()
: myPolyData(new IVtkVTK_ShapeData()), : myPolyData(new IVtkVTK_ShapeData()),
myIsFastTransformMode(Standard_False), myIsFastTransformMode(Standard_False),

View File

@ -109,10 +109,8 @@ static void copyCells(vtkPolyData* theDst, vtkPolyData* theSrc, vtkIdList* theId
vtkStandardNewMacro(IVtkTools_SubPolyDataFilter) vtkStandardNewMacro(IVtkTools_SubPolyDataFilter)
//================================================================ //=================================================================================================
// Function : Constructor
// Purpose :
//================================================================
IVtkTools_SubPolyDataFilter::IVtkTools_SubPolyDataFilter() IVtkTools_SubPolyDataFilter::IVtkTools_SubPolyDataFilter()
: myIdsArrayName(IVtkVTK_ShapeData::ARRNAME_SUBSHAPE_IDS()), : myIdsArrayName(IVtkVTK_ShapeData::ARRNAME_SUBSHAPE_IDS()),
myDoFiltering(true), myDoFiltering(true),

Some files were not shown because too many files have changed in this diff Show More