예제 #1
0
        public virtual double distanceTo(BIMModel paramBIMModel)
        {
            double d1 = this.offsetToModel.OffsetX.Value * this.offsetToModel.VertexConversionFactor.Value;
            double d2 = this.offsetToModel.OffsetY.Value * this.offsetToModel.VertexConversionFactor.Value;
            double d3 = this.offsetToModel.OffsetZ.Value * this.offsetToModel.VertexConversionFactor.Value;
            double d4 = paramBIMModel.OffsetX.Value * paramBIMModel.VertexConversionFactor.Value;
            double d5 = paramBIMModel.OffsetY.Value * paramBIMModel.VertexConversionFactor.Value;
            double d6 = paramBIMModel.OffsetZ.Value * paramBIMModel.VertexConversionFactor.Value;

            return(Math.Sqrt(Math.Pow(d1 - d4, 2.0D) + Math.Pow(d2 - d5, 2.0D) + Math.Pow(d3 - d6, 2.0D)));
        }
예제 #2
0
 public virtual void updateOffset(BIMModel paramBIMModel)
 {
     if (this.offsetToModel == null)
     {
         this.offsetToModel = paramBIMModel;
     }
     else if (isVeryFarFromCurrentOffset(paramBIMModel))
     {
         this.offsetToModel = paramBIMModel;
     }
 }
예제 #3
0
        public virtual GeometryData updateGeometryData(BIMModel paramBIMModel, GeometryData paramGeometryData)
        {
            sbyte b = paramGeometryData.NormalsInterleaved ? 6 : 3;

            if (this.offsetToModel != null && paramBIMModel != this.offsetToModel)
            {
                double d1 = -paramBIMModel.OffsetX.Value + this.offsetToModel.OffsetX.Value;
                double d2 = -paramBIMModel.OffsetY.Value + this.offsetToModel.OffsetY.Value;
                double d3 = -paramBIMModel.OffsetZ.Value + this.offsetToModel.OffsetZ.Value;
                paramGeometryData.applyConversions(d1, d2, d3, paramBIMModel.VertexConversionFactor.Value);
            }
            else if (paramBIMModel.VertexConversionFactor.Value != 1.0D)
            {
                paramGeometryData.applyConversions(0.0D, 0.0D, 0.0D, paramBIMModel.VertexConversionFactor.Value);
            }
            return(paramGeometryData);
        }
예제 #4
0
 public virtual void removeOffset()
 {
     this.offsetToModel = null;
 }
예제 #5
0
 private bool isVeryFarFromCurrentOffset(BIMModel paramBIMModel)
 {
     return(Math.Abs(distanceTo(paramBIMModel)) > 1000000.0D);
 }
예제 #6
0
 public ComparatorAnonymousInnerClass(BIMModel outerInstance)
 {
     this.outerInstance = outerInstance;
 }