mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028811: Visualization - merge texturing support into AIS_Shape class and get rid of AIS_TexturedShape
AIS_Shape and AIS_ColoredShape now computes Shaded presentation with UV coordinates if texture mapping is enabled in Drawer. OpenGl_Context::SetTextureMatrix() - fixed inconsistent handling of texture cooridnates translation vector. vtexture command has been extended to handle new arguments: * -trsfTrans, -trsfScale, -trsfAngle defining transformation matrix * -setFilter, -setAnisoFilter to setup texture filtering
This commit is contained in:
@@ -298,10 +298,12 @@ void AIS_ColoredShape::UnsetTransparency()
|
||||
if (myDrawer->HasOwnShadingAspect())
|
||||
{
|
||||
myDrawer->ShadingAspect()->SetTransparency (0.0, myCurrentFacingModel);
|
||||
}
|
||||
if (!HasColor() && !HasMaterial())
|
||||
{
|
||||
myDrawer->SetShadingAspect (Handle(Prs3d_ShadingAspect)());
|
||||
if (!HasColor()
|
||||
&& !HasMaterial()
|
||||
&& !myDrawer->ShadingAspect()->Aspect()->ToMapTexture())
|
||||
{
|
||||
myDrawer->SetShadingAspect (Handle(Prs3d_ShadingAspect)());
|
||||
}
|
||||
}
|
||||
|
||||
for (AIS_DataMapOfShapeDrawer::Iterator anIter (myShapeColors); anIter.More(); anIter.Next())
|
||||
@@ -499,7 +501,10 @@ void AIS_ColoredShape::addShapesWithCustomProps (const Handle(Prs3d_Presentation
|
||||
// add special wireframe presentation for faces without triangulation
|
||||
StdPrs_ShadedShape::AddWireframeForFacesWithoutTriangles (thePrs, aShapeDraw, aDrawer);
|
||||
|
||||
Handle(Graphic3d_ArrayOfTriangles) aTriangles = StdPrs_ShadedShape::FillTriangles (aShapeDraw);
|
||||
Handle(Graphic3d_ArrayOfTriangles) aTriangles = StdPrs_ShadedShape::FillTriangles (aShapeDraw,
|
||||
aDrawer->ShadingAspect()->Aspect()->ToMapTexture()
|
||||
&& !aDrawer->ShadingAspect()->Aspect()->TextureMap().IsNull(),
|
||||
myUVOrigin, myUVRepeat, myUVScale);
|
||||
if (!aTriangles.IsNull())
|
||||
{
|
||||
if (aShadedGroup.IsNull())
|
||||
|
Reference in New Issue
Block a user