1464702f4SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3464702f4SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4464702f4SAndrew Rist * or more contributor license agreements. See the NOTICE file 5464702f4SAndrew Rist * distributed with this work for additional information 6464702f4SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7464702f4SAndrew Rist * to you under the Apache License, Version 2.0 (the 8464702f4SAndrew Rist * "License"); you may not use this file except in compliance 9464702f4SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11464702f4SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13464702f4SAndrew Rist * Unless required by applicable law or agreed to in writing, 14464702f4SAndrew Rist * software distributed under the License is distributed on an 15464702f4SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16464702f4SAndrew Rist * KIND, either express or implied. See the License for the 17464702f4SAndrew Rist * specific language governing permissions and limitations 18464702f4SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20464702f4SAndrew Rist *************************************************************/ 21464702f4SAndrew Rist 22cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 23cdf0e10cSrcweir #include "precompiled_drawinglayer.hxx" 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include <drawinglayer/primitive3d/groupprimitive3d.hxx> 26cdf0e10cSrcweir #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> 27cdf0e10cSrcweir 28cdf0e10cSrcweir using namespace com::sun::star; 29cdf0e10cSrcweir 30cdf0e10cSrcweir namespace drawinglayer 31cdf0e10cSrcweir { 32cdf0e10cSrcweir namespace primitive3d 33cdf0e10cSrcweir { GroupPrimitive3D(const Primitive3DSequence & rChildren)34cdf0e10cSrcweir GroupPrimitive3D::GroupPrimitive3D( const Primitive3DSequence& rChildren ) 35cdf0e10cSrcweir : BasePrimitive3D(), 36cdf0e10cSrcweir maChildren(rChildren) 37cdf0e10cSrcweir { 38cdf0e10cSrcweir } 39cdf0e10cSrcweir 40*209aa30eSmseidel /** The compare operator uses the Sequence::==operator, so only checking if 41*209aa30eSmseidel the references are equal. All non-equal references are interpreted as 42cdf0e10cSrcweir non-equal. 43cdf0e10cSrcweir */ operator ==(const BasePrimitive3D & rPrimitive) const44cdf0e10cSrcweir bool GroupPrimitive3D::operator==( const BasePrimitive3D& rPrimitive ) const 45cdf0e10cSrcweir { 46cdf0e10cSrcweir if(BasePrimitive3D::operator==(rPrimitive)) 47cdf0e10cSrcweir { 48cdf0e10cSrcweir const GroupPrimitive3D& rCompare = static_cast< const GroupPrimitive3D& >(rPrimitive); 49cdf0e10cSrcweir 50cdf0e10cSrcweir return (arePrimitive3DSequencesEqual(getChildren(), rCompare.getChildren())); 51cdf0e10cSrcweir } 52cdf0e10cSrcweir 53cdf0e10cSrcweir return false; 54cdf0e10cSrcweir } 55cdf0e10cSrcweir 56*209aa30eSmseidel // default: just return children, so all renderers not supporting group will use its content get3DDecomposition(const geometry::ViewInformation3D &) const57cdf0e10cSrcweir Primitive3DSequence GroupPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const 58cdf0e10cSrcweir { 59cdf0e10cSrcweir return getChildren(); 60cdf0e10cSrcweir } 61cdf0e10cSrcweir 62cdf0e10cSrcweir // provide unique ID 63cdf0e10cSrcweir ImplPrimitrive3DIDBlock(GroupPrimitive3D, PRIMITIVE3D_ID_GROUPPRIMITIVE3D) 64cdf0e10cSrcweir 65cdf0e10cSrcweir } // end of namespace primitive3d 66cdf0e10cSrcweir } // end of namespace drawinglayer 67cdf0e10cSrcweir 68*209aa30eSmseidel /* vim: set noet sw=4 ts=4: */ 69