Hi again,
i want to refine a previous question:
How do i project a sphere onto the screen?
(2) gives a simple solution:
approximate radius on screen = world radius * cot(fov / 2) / Z
with:
fov = field of view angle
Z = z distance from camera to sphere
result is in clipspace, apply viewport to get size in pixels
Now my problem ...
hi all,
this is an oldie, but i cannot seem to find a solution.
When i want to do an st_transform on a 900913 coordinate to a 4326 system, the y coordinate shifts.
example:
SELECT
AsText(
Transform(
Transform(
GeomFromText( 'POINT( 449760.25168159 6790560.4594059 )', 900913),
4326
),
900913
)
)
here the original 900913 stating p...
Hello,
I have an 2D object (GL_QUAD) with size (W,H) and sitting at (-W*0.5, -H*0.5).
I'd rather not resize the object, because I need to be able to select points on that object relative to the texture. (i.e. (x,y) in openGL translates to (x,y) on the texture - no scaling needed).
What I want to do is change the camera properties (pro...
I have an entity called Incident and a DTO called IncidentDTO. For now, IncidentDTO simply looks like this:
public class IncidentDTO : Incident
{
// empty until I can get AutoMapper working correctly
}
I'm trying to pull a list of all the Incidents in the database and convert them to DTOs using this code:
Mapper.CreateMap<Inciden...
Hi folks,
i've got a really simple linq to entites statement :-
var query = (from q in Users.Include("UserHistory")
select q).Take(20);
works great ... except that, for each user .. the history can be n+1. Some users have 100's of UserHistory records.
So, can I restrict the the number of UserHistory records to .. 10 or 5...
I noticed most resources either assume you know a lot already or assume you know math of professional level or assume you're going to find other resources to fill gaps.
Is there a resource that takes someone without already a knowledge on view matrices in graphics and takes them to understanding fully how
to set up a 'virtual camera'
...
Hello,
I would like to create a really simple tag parameterized with a collections' ids something like the following:
<s:url action="theaction" namespace="/" includeParams="all" id="histURL">
<s:param name="sources" value="sources.{id}"></s:param>
</s:url>
${histURL}
If I have say three Source objects defined in my Action class, h...
Hey this may sound simple but it escapes me,
I have a list of 3D points (including negative positions) that I would like to map onto a 2D Texture.
I'm trying to figure out how to map the points appropriately to the texture and how it differs if it has a specific width/height.
Thanks
...
I'm adding lines to my 3D world like we see in 3D studio max. To draw lines I'm using a cylinder mesh and simply stretching/rotating it appropriately. That's all working fine but my problem is scale. Since it's 3D geometry rendering in perspective its size changes, from a distance it's small to invisible, up close it's huge.
I want to m...
I'm wondering if there is built-in .NET functionality to change each value in an array based on the result of a provided delegate. For example, if I had an array {1,2,3} and a delegate that returns the square of each value, I would like to be able to run a method that takes the array and delegate, and returns {1,4,9}. Does anything lik...
I'm attempting to create a small "automapper-esq" utility that will take a LinqToSql entity and map it to a "projection class".
So far I have something like this:
class Entity
{
public int ID { get; set; }
public string WantedProperty { get; set; }
public string UnWantedPropertyData { get; set; }
...More Unwanted Proper...
I have this mapping file:
'class name="WebTools.Data.Common.IHObjekt, WebTools.Data" table="IHObjekt"'
....
'property name="TYPBEZEICH" type="string"'
...
'many-to-one name="standort" column="STANDORT_ID" fetch="join"'
And I would like to use a 'Projections.ProjectionList()' to reduce the number of returned columns from the...
Using NHibernate, I am trying to set the value of a class contained within another class. For example:
public class Object
{
public virtual string CODE { get; set; }
public virtual string INFO { get; set; }
public virtual int ID { get; set; }
public virtual Location location { get; set; }
}
public class Location
...
My Database contains three tables: PermissionCategories, Permissions, and Users. There is a many to many relationship between Permissions and Users which is resolved by a UserPermissions table.
Using Entity Framework projection I'm trying to get all the PermissionCategories and include (eager load) the permissions filtered by userId.
M...
If I have a class like the following:
public class Customer {
public int id {get;set;}
public string name {get;set;}
public string line1 {get;set;}
public string line2 {get;set;}
public string line3 {get;set;}
public string line4 {get;set;}
}
And I only want to select the ID and Name values, leaving the ...
I have an IQueryable whose Entity Framework 4 objects I would like to project to their DTO equivalents. One such object 'Person' is an EF4 class, and the corresponding POCO PersonP is a class I've defined. I am using Automapper to map between them. However, when I try the following code:
IQueryable<Person> originalModel = _repo.QueryAll...
I'm using the below code to put an overlay on my MapView. For some reason after itterating through the location data it draws the point in the same place.
It seems to be happening on conversion from Location to GeoPoint to Projection:
Location (lat : lon) 51.2651789188385 : -0.5398589372634888
Projection (x : y) 239 : ...