1
0
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:
kgv
2017-07-17 15:19:33 +03:00
committed by bugmaster
parent 798849860f
commit a6dee93dfa
19 changed files with 648 additions and 481 deletions

View File

@@ -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())