internal override void QueryEnvelope3D(com.epl.geometry.Envelope3D env) { env.xmin = m_envelope.xmin; env.ymin = m_envelope.ymin; env.xmax = m_envelope.xmax; env.ymax = m_envelope.ymax; env.SetCoords(m_envelope.xmin, m_envelope.ymin, _getAttributeAsDbl(0, com.epl.geometry.VertexDescription.Semantics.Z, 0), m_envelope.xmax, m_envelope.ymax, _getAttributeAsDbl(1, com.epl.geometry.VertexDescription.Semantics.Z, 0)); }
public void Merge(com.epl.geometry.Envelope3D other) { if (other.IsEmpty()) { return; } Merge(other.xmin, other.ymin, other.zmin); Merge(other.xmax, other.ymax, other.zmax); }
/// <summary>Transforms an envelope.</summary> /// <remarks> /// Transforms an envelope. The result is the bounding box of the transformed /// envelope. /// </remarks> public com.epl.geometry.Envelope3D Transform(com.epl.geometry.Envelope3D env) { if (env.IsEmpty()) { return(env); } com.epl.geometry.Point3D[] buf = new com.epl.geometry.Point3D[8]; env.QueryCorners(buf); Transform(buf, 8, buf); env.SetFromPoints(buf); return(env); }
internal override void QueryEnvelope3D(com.epl.geometry.Envelope3D env) { if (IsEmptyImpl()) { env.SetEmpty(); return; } com.epl.geometry.Point3D pt = GetXYZ(); env.xmin = pt.x; env.ymin = pt.y; env.zmin = pt.z; env.xmax = pt.x; env.ymax = pt.y; env.zmax = pt.z; }
public override bool Equals(object _other) { if (_other == this) { return(true); } if (!(_other is com.epl.geometry.Envelope3D)) { return(false); } com.epl.geometry.Envelope3D other = (com.epl.geometry.Envelope3D)_other; if (IsEmpty() && other.IsEmpty()) { return(true); } if (xmin != other.xmin || ymin != other.ymin || zmin != other.zmin || xmax != other.xmax || ymax != other.ymax || zmax != other.zmax) { return(false); } return(true); }
internal override void ApplyTransformation(com.epl.geometry.Transformation3D transform) { _touch(); if (!m_envelope.IsEmpty()) { com.epl.geometry.Envelope3D env = new com.epl.geometry.Envelope3D(); QueryEnvelope3D(env); if (env.IsEmptyZ()) { env.SetEmpty(); } else { // Z components is empty, the // AffineTransformation3D makes the whole // envelope empty. Consider // throwing an assert instead. transform.Transform(env); } } }
// check that x projections overlap // check that y projections overlap // check that z projections overlap /// <summary> /// Intersects this envelope with the other and stores result in this /// envelope. /// </summary> /// <returns> /// True if this envelope intersects the other, otherwise sets this /// envelope to empty state and returns False. /// </returns> public bool Intersect(com.epl.geometry.Envelope3D other) { if (IsEmpty() || other.IsEmpty()) { return(false); } if (other.xmin > xmin) { xmin = other.xmin; } if (other.xmax < xmax) { xmax = other.xmax; } if (other.ymin > ymin) { ymin = other.ymin; } if (other.ymax < ymax) { ymax = other.ymax; } if (other.zmin > zmin) { zmin = other.zmin; } if (other.zmax < zmax) { zmax = other.zmax; } bool bIntersecting = xmin <= xmax && ymin <= ymax && zmin <= zmax; if (!bIntersecting) { SetEmpty(); } return(bIntersecting); }
// Checked vs. Jan 11, 2011 // TODO rename to remove 3D internal override void QueryLooseEnvelope3D(com.epl.geometry.Envelope3D env) { _updateLooseEnvelope(env); }
// note: overload for polylines/polygons with curves // Checked vs. Jan 11, 2011 /// <summary>\internal Calculates loose envelope.</summary> /// <remarks> /// \internal Calculates loose envelope. Returns True if the calculation /// renders exact envelope. /// </remarks> protected internal virtual void _updateLooseEnvelope(com.epl.geometry.Envelope3D env) { // TODO ROHIT has this set to true? _updateAllDirtyIntervals(false); m_envelope.QueryEnvelope3D(env); }
// note: overload for polylines/polygons with curves // Checked vs. Jan 11, 2011 protected internal virtual void _updateEnvelope(com.epl.geometry.Envelope3D env) { _updateAllDirtyIntervals(true); m_envelope.QueryEnvelope3D(env); }
internal override void QueryEnvelope3D(com.epl.geometry.Envelope3D env) { env.SetEmpty(); env.Merge(m_xStart, m_yStart, _getAttributeAsDbl(0, com.epl.geometry.VertexDescription.Semantics.Z, 0)); env.Merge(m_xEnd, m_yEnd, _getAttributeAsDbl(1, com.epl.geometry.VertexDescription.Semantics.Z, 0)); }
/// <summary>Returns tight bbox of the Geometry in 3D.</summary> internal abstract void QueryEnvelope3D(com.epl.geometry.Envelope3D env);
/// <summary> /// Returns True if the envelope contains the other envelope (boundary /// inclusive). /// </summary> public bool Contains(com.epl.geometry.Envelope3D other) { // Note: Will return False, if either envelope is empty. return(other.xmin >= xmin && other.xmax <= xmax && other.ymin >= ymin && other.ymax <= ymax && other.zmin >= zmin && other.zmax <= zmax); }
/// <summary>Checks if this envelope intersects the other.</summary> /// <returns>True if this envelope intersects the other.</returns> public bool IsIntersecting(com.epl.geometry.Envelope3D other) { return(!IsEmpty() && !other.IsEmpty() && ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin) && ((ymin <= other.ymin) ? ymax >= other.ymin : other.ymax >= ymin) && ((zmin <= other.zmin) ? zmax >= other.zmin : other.zmax >= zmin)); }
public void SetCoords(com.epl.geometry.Envelope3D envSrc) { SetCoords(envSrc.xmin, envSrc.ymin, envSrc.zmin, envSrc.xmax, envSrc.ymax, envSrc.zmax); }
internal override void QueryEnvelope3D(com.epl.geometry.Envelope3D env) { m_impl.QueryEnvelope3D(env); }
public static com.epl.geometry.Envelope3D Construct(double _xmin, double _ymin, double _zmin, double _xmax, double _ymax, double _zmax) { com.epl.geometry.Envelope3D env = new com.epl.geometry.Envelope3D(_xmin, _ymin, _zmin, _xmax, _ymax, _zmax); return(env); }
/// <summary>Returns tight conservative box of the Geometry in 3D.</summary> /// <remarks> /// Returns tight conservative box of the Geometry in 3D. This is a faster /// method than the QueryEnvelope3D. However, the box could be larger than /// the tight box. /// </remarks> internal virtual void QueryLooseEnvelope3D(com.epl.geometry.Envelope3D env) { QueryEnvelope3D(env); }
public Envelope3D(com.epl.geometry.Envelope3D other) { SetCoords(other); }