Search Results

Search found 3444 results on 138 pages for 'mapping'.

Page 1/138 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Start a Mapping or Process Flow from OWB Browser

    - by Dong Ruirong
    Basically, we start a Mapping or Process Flow from Oracle Warehouse Builder (OWB) Design Client. But actually we can also start a Mapping or Process Flow from OWB Browser. This paper will introduce the Start Report first and then introduce how to start/rerun a Mapping or Process Flow from OWB Browser. Start Report Start Report is used to start an execution of a Mapping or Process Flow. So there are two kinds of Start Report: Mapping Start Report (See Figure 1) and Process Flow Start Report (See Figure 2). Start Report shows the Mapping or Process Flow identification properties, including latest deployment and latest execution, lists all execution parameters for the Mapping or Process Flow, which were specified by the latest deployment, and assigns parameter default values from the latest deployment specification. You can do a couple of things from Start Report: Sort execution parameters on name, category. Table 1 lists all parameters of a Mapping. Table 2 lists all parameters of a Process Flow. Change values of any input parameter where permitted. For some parameters, selection lists are provided. For example, Mapping’s parameter Audit Level has a selection list. Reset all parameter settings to their default values. Apply basic validation to parameter values before starting an execution. Start the Mapping or Process Flow, which means it is executed immediately. Navigate to Deployment Report for latest deployment details of the Mapping or Process Flow. Navigate to Execution Job Report for latest execution of current Mapping or Process Flow Link to on-link help Warehouse Report Page, Deployment Report, Execution Report, Execution Schedule Report and Execution Summary Report. Figure 1 Mapping Start Report Table 1 Execution Parameters and default values for a Mapping Category Name Mode Input Value System Audit Level In Error Details System Bulk Size In 1000 System Commit Frequency In 1000 System EXECUTE_RESUME_TASK In FALSE System FORCE_RESUME_OPTION In FALSE System Max No of Errors In 50 System NUMBER_OF_TIMES_TO_RETRY In 2 System Operating Mode In Set Based Fail Over to Row Based System PARALLEL_LEVEL In 0 System Procedure Name In main System Purge Group In WB Figure 2 Process Flow Start Report Table 2 Execution Parameters and default values for a Process Flow Category Name Mode Input Value System EVAL_LOCATION In   System Item Key In-Out   System Item Type In PFPKG_1 Start a Mapping or Process Flow To navigate to Start Report, it’s better to login OWB Browser with Control Center option; if not, after logging in OWB Browser, go to Control Center first. Then you can follow the ways introduced in this section to navigate to Start Report. One more thing you need to pay attention to is that you are not allowed to deploy any Mappings and Process Flows from OWB Browser as it’s not supported. So it’s necessary to deploy the Mappings and Process Flows first before starting them from OWB Browser. If you have deployed a Mapping or Process Flow but have not started it, please navigate from Object Summary Report or Deployment Schedule Report to Start Report. 1. Navigating from Object Summary Report to Start Report Open the Object Summary Report to see all deployed Mappings and Process Flows. Click the Mapping Name or Process Flow Name link to see its Deployment Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. 2. Navigating from Deployment Schedule Report to Start Report Open the Deployment Schedule Report to see deployment details of Mapping and Process Flow. Expand the project trees to find the deployed Mappings and Process Flows. Click the Mapping Name or Process Flow Name link to see its Deployment Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. Re-run a Mapping or Process Flow If you have executed a Mapping or Process Flow, you can navigate from Object Summary Report, Deployment Schedule Report, Execution Summary Report or Execution Schedule Report to Start Report. 1. Navigating from the Execution Summary Report to Start Report Open the Execution Summary Report to see all execution jobs including Mapping jobs and Process Flow jobs. Click on the Mapping Name or Process Flow Name to see its Execution Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. 2. Navigating from the Execution Schedule Report to Start Report Open the Execution Schedule Report to see list of all executions of Mapping and Process Flow. Click on the Mapping Name or Process Flow Name to see its Execution Report. Select the Start link in the Available Reports tab for the given Mapping or Process Flow to display a Start Report for the Mapping or Process Flow. The execution parameters have the default deployment-time settings. Change any of the input parameter values as required. Click Start Execution button to execute the Mapping or Process Flow. If the execution of a Mapping or Process Flow is successful, you will see this message from the Start Report: Start Execution request successful. (See Figure 3) Figure 3 Execution Result You can also confirm the execution of the Mapping or Process Flow by referring to Execution Report of the current Mapping or Process Flow by clicking the link in the Available Reports tab for the given Mapping or Process Flow. One new record of execution job details is added to Execution Report of the Mapping or Process Flow which shows the details of the execution such as Start Time, Elapsed Time, Status, the number of records selected, inserted, updated, deleted etc.

    Read the article

  • The Best Websites and Software for Brainstorming and Mind Mapping

    - by Lori Kaufman
    A mind map is a diagram that allows you to visually outline information, helping you organize, solve problems, and make decisions. Start with a single idea in the center of the diagram and add associated ideas, words, and concepts connected radially around the central idea. We’ve collected links to websites and software that can help you create mind maps, and collaborate on and share your maps with others. The programs and websites listed here are all either free or have a free option. How To Delete, Move, or Rename Locked Files in Windows HTG Explains: Why Screen Savers Are No Longer Necessary 6 Ways Windows 8 Is More Secure Than Windows 7

    Read the article

  • ODI 12c's Mapping Designer - Combining Flow Based and Expression Based Mapping

    - by Madhu Nair
    post by David Allan ODI is renowned for its declarative designer and minimal expression based paradigm. The new ODI 12c release has extended this even further to provide an extended declarative mapping designer. The ODI 12c mapper is a fusion of ODI's new declarative designer with the familiar flow based designer while retaining ODI’s key differentiators of: Minimal expression based definition, The ability to incrementally design an interface and to extract/load data from any combination of sources, and most importantly Backed by ODI’s extensible knowledge module framework. The declarative nature of the product has been extended to include an extensible library of common components that can be used to easily build simple to complex data integration solutions. Big usability improvements through consistent interactions of components and concepts all constructed around the familiar knowledge module framework provide the utmost flexibility. Here is a little taster: So what is a mapping? A mapping comprises of a logical design and at least one physical design, it may have many. A mapping can have many targets, of any technology and can be arbitrarily complex. You can build reusable mappings and use them in other mappings or other reusable mappings. In the example below all of the information from an Oracle bonus table and a bonus file are joined with an Oracle employees table before being written to a target. Some things that are cool include the one-click expression cross referencing so you can easily see what's used where within the design. The logical design in a mapping describes what you want to accomplish  (see the animated GIF here illustrating how the above mapping was designed) . The physical design lets you configure how it is to be accomplished. So you could have one logical design that is realized as an initial load in one physical design and as an incremental load in another. In the physical design below we can customize how the mapping is accomplished by picking Knowledge Modules, in ODI 12c you can pick multiple nodes (on logical or physical) and see common properties. This is useful as we can quickly compare property values across objects - below we can see knowledge modules settings on the access points between execution units side by side, in the example one table is retrieved via database links and the other is an external table. In the logical design I had selected an append mode for the integration type, so by default the IKM on the target will choose the most suitable/default IKM - which in this case is an in-built Oracle Insert IKM (see image below). This supports insert and select hints for the Oracle database (the ANSI SQL Insert IKM does not support these), so by default you will get direct path inserts with Oracle on this statement. In ODI 12c, the mapper is just that, a mapper. Design your mapping, write to multiple targets, the targets can be in the same data server, in different data servers or in totally different technologies - it does not matter. ODI 12c will derive and generate a plan that you can use or customize with knowledge modules. Some of the use cases which are greatly simplified include multiple heterogeneous targets, multi target inserts for Oracle and writing of XML. Let's switch it up now and look at a slightly different example to illustrate expression reuse. In ODI you can define reusable expressions using user functions. These can be reused across mappings and the implementations specialized per technology. So you can have common expressions across Oracle, SQL Server, Hive etc. shielding the design from the physical aspects of the generated language. Another way to reuse is within a mapping itself. In ODI 12c expressions can be defined and reused within a mapping. Rather than replicating the expression text in larger expressions you can decompose into smaller snippets, below you can see UNIT_TAX AMOUNT has been defined and is used in two downstream target columns - its used in the TOTAL_TAX_AMOUNT plus its used in the UNIT_TAX_AMOUNT (a recording of the calculation).  You can see the columns that the expressions depend on (upstream) and the columns the expression is used in (downstream) highlighted within the mapper. Also multi selecting attributes is a convenient way to see what's being used where, below I have selected the TOTAL_TAX_AMOUNT in the target datastore and the UNIT_TAX_AMOUNT in UNIT_CALC. You can now see many expressions at once now and understand much more at the once time without needlessly clicking around and memorizing information. Our mantra during development was to keep it simple and make the tool more powerful and do even more for the user. The development team was a fusion of many teams from Oracle Warehouse Builder, Sunopsis and BEA Aqualogic, debating and perfecting the mapper in ODI 12c. This was quite a project from supporting the capabilities of ODI in 11g to building the flow based mapping tool to support the future. I hope this was a useful insight, there is so much more to come on this topic, this is just a preview of much more that you will see of the mapper in ODI 12c.

    Read the article

  • Need help with NHibernate / Fluent NHibernate mapping

    - by Mark Boltuc
    Let's say your have the following table structure: ============================== | Case | ============================== | Id | int | | ReferralType | varchar(10) | +---------| ReferralId | int |---------+ | ============================== | | | | | | | ====================== ====================== ====================== | SourceA | | SourceB | | SourceC | ====================== ====================== ====================== | Id | int | | Id | int | | Id | int | | Name | varchar(50) | | Name | varchar(50) | | Name | varchar(50) | ====================== ====================== ====================== Based on the ReferralType the ReferralId contains id to the SourceA, SourceB, or SourceC I'm trying to figure out how to map this using Fluent NHibernate or just plain NHibernate into an object model. I've tried a bunch of different things but I haven't been succesful. Any ideas? The object model might be something like: public class Case { public int Id { get; set; } public Referral { get; set; } } public class Referral { public string Type { get; set; } public int Id { get; set; } public string Name { get; set; } }

    Read the article

  • Entity Association Mapping with Code First Part 1 : Mapping Complex Types

    - by mortezam
    Last week the CTP5 build of the new Entity Framework Code First has been released by data team at Microsoft. Entity Framework Code-First provides a pretty powerful code-centric way to work with the databases. When it comes to associations, it brings ultimate flexibility. I’m a big fan of the EF Code First approach and am planning to explain association mapping with code first in a series of blog posts and this one is dedicated to Complex Types. If you are new to Code First approach, you can find a great walkthrough here. In order to build a solid foundation for our discussion, we will start by learning about some of the core concepts around the relationship mapping.   What is Mapping?Mapping is the act of determining how objects and their relationships are persisted in permanent data storage, in our case, relational databases. What is Relationship mapping?A mapping that describes how to persist a relationship (association, aggregation, or composition) between two or more objects. Types of RelationshipsThere are two categories of object relationships that we need to be concerned with when mapping associations. The first category is based on multiplicity and it includes three types: One-to-one relationships: This is a relationship where the maximums of each of its multiplicities is one. One-to-many relationships: Also known as a many-to-one relationship, this occurs when the maximum of one multiplicity is one and the other is greater than one. Many-to-many relationships: This is a relationship where the maximum of both multiplicities is greater than one. The second category is based on directionality and it contains two types: Uni-directional relationships: when an object knows about the object(s) it is related to but the other object(s) do not know of the original object. To put this in EF terminology, when a navigation property exists only on one of the association ends and not on the both. Bi-directional relationships: When the objects on both end of the relationship know of each other (i.e. a navigation property defined on both ends). How Object Relationships Are Implemented in POCO domain models?When the multiplicity is one (e.g. 0..1 or 1) the relationship is implemented by defining a navigation property that reference the other object (e.g. an Address property on User class). When the multiplicity is many (e.g. 0..*, 1..*) the relationship is implemented via an ICollection of the type of other object. How Relational Database Relationships Are Implemented? Relationships in relational databases are maintained through the use of Foreign Keys. A foreign key is a data attribute(s) that appears in one table and must be the primary key or other candidate key in another table. With a one-to-one relationship the foreign key needs to be implemented by one of the tables. To implement a one-to-many relationship we implement a foreign key from the “one table” to the “many table”. We could also choose to implement a one-to-many relationship via an associative table (aka Join table), effectively making it a many-to-many relationship. Introducing the ModelNow, let's review the model that we are going to use in order to implement Complex Type with Code First. It's a simple object model which consist of two classes: User and Address. Each user could have one billing address. The Address information of a User is modeled as a separate class as you can see in the UML model below: In object-modeling terms, this association is a kind of aggregation—a part-of relationship. Aggregation is a strong form of association; it has some additional semantics with regard to the lifecycle of objects. In this case, we have an even stronger form, composition, where the lifecycle of the part is fully dependent upon the lifecycle of the whole. Fine-grained domain models The motivation behind this design was to achieve Fine-grained domain models. In crude terms, fine-grained means “more classes than tables”. For example, a user may have both a billing address and a home address. In the database, you may have a single User table with the columns BillingStreet, BillingCity, and BillingPostalCode along with HomeStreet, HomeCity, and HomePostalCode. There are good reasons to use this somewhat denormalized relational model (performance, for one). In our object model, we can use the same approach, representing the two addresses as six string-valued properties of the User class. But it’s much better to model this using an Address class, where User has the BillingAddress and HomeAddress properties. This object model achieves improved cohesion and greater code reuse and is more understandable. Complex Types: Splitting a Table Across Multiple Types Back to our model, there is no difference between this composition and other weaker styles of association when it comes to the actual C# implementation. But in the context of ORM, there is a big difference: A composed class is often a candidate Complex Type. But C# has no concept of composition—a class or property can’t be marked as a composition. The only difference is the object identifier: a complex type has no individual identity (i.e. no AddressId defined on Address class) which make sense because when it comes to the database everything is going to be saved into one single table. How to implement a Complex Types with Code First Code First has a concept of Complex Type Discovery that works based on a set of Conventions. The convention is that if Code First discovers a class where a primary key cannot be inferred, and no primary key is registered through Data Annotations or the fluent API, then the type will be automatically registered as a complex type. Complex type detection also requires that the type does not have properties that reference entity types (i.e. all the properties must be scalar types) and is not referenced from a collection property on another type. Here is the implementation: public class User{    public int UserId { get; set; }    public string FirstName { get; set; }    public string LastName { get; set; }    public string Username { get; set; }    public Address Address { get; set; }} public class Address {     public string Street { get; set; }     public string City { get; set; }            public string PostalCode { get; set; }        }public class EntityMappingContext : DbContext {     public DbSet<User> Users { get; set; }        } With code first, this is all of the code we need to write to create a complex type, we do not need to configure any additional database schema mapping information through Data Annotations or the fluent API. Database SchemaThe mapping result for this object model is as follows: Limitations of this mappingThere are two important limitations to classes mapped as Complex Types: Shared references is not possible: The Address Complex Type doesn’t have its own database identity (primary key) and so can’t be referred to by any object other than the containing instance of User (e.g. a Shipping class that also needs to reference the same User Address). No elegant way to represent a null reference There is no elegant way to represent a null reference to an Address. When reading from database, EF Code First always initialize Address object even if values in all mapped columns of the complex type are null. This means that if you store a complex type object with all null property values, EF Code First returns a initialized complex type when the owning entity object is retrieved from the database. SummaryIn this post we learned about fine-grained domain models which complex type is just one example of it. Fine-grained is fully supported by EF Code First and is known as the most important requirement for a rich domain model. Complex type is usually the simplest way to represent one-to-one relationships and because the lifecycle is almost always dependent in such a case, it’s either an aggregation or a composition in UML. In the next posts we will revisit the same domain model and will learn about other ways to map a one-to-one association that does not have the limitations of the complex types. References ADO.NET team blog Mapping Objects to Relational Databases Java Persistence with Hibernate

    Read the article

  • How do I add shadow mapping?

    - by Jasper Creyf
    How do I add shadow mapping? I don't care if it uses GLSL it just has to work. I have been searching on stencil shadows and shadow mapping, all the examples given did nothing, if you don't understand that it means not even a single shadow is even being rendered. If you know how to add stencil shadows or shadow mapping, then please show some java code and if you're using GLSL then please show the code for them too.

    Read the article

  • How to deploy jBPM 3.2.2 console on Oracle 10g iAS

    - by Balint Pato
    Hi! Does anybody have experience regarding deployment of the jBPM Administration Console on Oracle 10g iAS? I successfully deployed it using an .ear, security mappings working, I can even login to the console, Hibernate finds the JNDI datasource but it cannot find the TransactionManager. I see no log, only the exception thrown in the jsf page: Can anybody help me? The hibernate.cfg.xml file now looks like this: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- hibernate dialect --> <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property> <!-- JDBC connection properties (begin) === <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property> <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property> <property name="hibernate.connection.username">sa</property> <property name="hibernate.connection.password"></property> ==== JDBC connection properties (end) --> <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> <!-- DataSource properties (begin) --> <property name="hibernate.connection.datasource">java:/JbpmDS</property> <!-- DataSource properties (end) --> <!-- JTA transaction properties (begin) --> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <!-- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>--> <!-- JTA transaction properties (end) --> <!-- CMT transaction properties (begin) === <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property> <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property> ==== CMT transaction properties (end) --> <!-- logging properties (begin) --> <property name="hibernate.show_sql">true</property> <property name="hibernate.format_sql">true</property> <property name="hibernate.use_sql_comments">true</property> <--==== logging properties (end) --> <!-- ############################################ --> <!-- # mapping files with external dependencies # --> <!-- ############################################ --> <!-- following mapping file has a dependendy on --> <!-- 'bsh-{version}.jar'. --> <!-- uncomment this if you don't have bsh on your --> <!-- classpath. you won't be able to use the --> <!-- script element in process definition files --> <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/> <!-- following mapping files have a dependendy on --> <!-- 'jbpm-identity.jar', mapping files --> <!-- of the pluggable jbpm identity component. --> <!-- Uncomment the following 3 lines if you --> <!-- want to use the jBPM identity mgmgt --> <!-- component. --> <!-- identity mappings (begin) --> <mapping resource="org/jbpm/identity/User.hbm.xml"/> <mapping resource="org/jbpm/identity/Group.hbm.xml"/> <mapping resource="org/jbpm/identity/Membership.hbm.xml"/> <!-- identity mappings (end) --> <!-- following mapping files have a dependendy on --> <!-- the JCR API --> <!-- jcr mappings (begin) === <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/> ==== jcr mappings (end) --> <!-- ###################### --> <!-- # jbpm mapping files # --> <!-- ###################### --> <!-- hql queries and type defs --> <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" /> <!-- graph.action mapping files --> <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/> <!-- graph.def mapping files --> <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/> <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/> <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/> <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/> <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/> <!-- graph.node mapping files --> <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/> <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/> <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/> <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/> <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/> <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/> <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/> <mapping resource="org/jbpm/graph/node/State.hbm.xml"/> <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/> <!-- context.def mapping files --> <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/> <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/> <!-- taskmgmt.def mapping files --> <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/> <!-- module.def mapping files --> <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/> <!-- bytes mapping files --> <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/> <!-- file.def mapping files --> <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/> <!-- scheduler.def mapping files --> <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/> <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/> <!-- graph.exe mapping files --> <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/> <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/> <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/> <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/> <!-- module.exe mapping files --> <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/> <!-- context.exe mapping files --> <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/> <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/> <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/> <!-- job mapping files --> <mapping resource="org/jbpm/job/Job.hbm.xml"/> <mapping resource="org/jbpm/job/Timer.hbm.xml"/> <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/> <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/> <!-- taskmgmt.exe mapping files --> <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/> <!-- logging mapping files --> <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/> <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/> <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/> <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/> <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/> </session-factory> </hibernate-configuration> ---- edit --- I have already tried the hibernate.transaction.manager_lookup_class to set to the JBoss version (org.hibernate.transaction.JBossTransactionManagerLookup) it did not work...well it's not that suprising...I'll try now: org.hibernate.transaction.OC4JTransactionManagerLookup I tried with CMT instead of JTA, but it didn't work also.

    Read the article

  • Custom shadow mapping in Unity 3D Free Edition

    - by nosferat
    Since real time hard and soft shadows are Unity 3D Pro only features I thought I will learn Cg programming and create my own shadow mapping shader. But after some digging I found that the shadow mapping technique uses depth textures, and in Unity depth values can be accessed through a Render Texture object, which is Unity Pro only again. So is it true, that I cannot create real time shadow shaders as a workaround to the limitations of the free version?

    Read the article

  • Shadow Mapping and Transparent Quads

    - by CiscoIPPhone
    Shadow mapping uses the depth buffer to calculate where shadows should be drawn. My problem is that I'd like some semi transparent textured quads to cast shadows - for example billboarded trees. As the depth value will be set across all of the quad and not just the visible parts it will cast a quad shadow, which is not what I want. How can I make my transparent quads cast correct shadows using shadow mapping?

    Read the article

  • Automated texture mapping

    - by brandon
    I have a set of seamless tiling textures. I want to be able to take an arbitrary model and create a UV map with these properties: No stretching (all textures tile appropriately so there is no stretching and sheering of the texture) The textures display on the correct axis relative to the model it's mapping to (if you look at the example, you can see some of the letters on the front are tilted, the y axis of the texture should be matching up with the y axis of the object. Some other faces have upside down letters too) the texture is as continuous as possible on the surface of the model (if two faces are adjacent, the texture continues on the adjacent face where it left off) the model is closed (all faces are completely enclosed by other faces) A few notes. This mapping will occur before triangulation. I realize there are ways to do this by hand and it's probably a hard problem to automatically map textures in general, but since these textures are seamless and I just need uniform coverage it seems like an easier problem. I'm looking for an algorithmic approach to this that I can apply in general, not a tool that does it. What approach would work for this, is there an existing one? (I assume so)

    Read the article

  • geomipmapping using displacement mapping (and glVertexAttribDivisor)

    - by Will
    I wake up with a clear vision, but sadly my laptop card doesn't do displacement mapping nor glVertexAttribDivisor so I can't test it out; I'm left sharing here: With geomipmapping, the grid at any factor is transposable - if you pass in an offset - say as a uniform - you can reuse the same vertex and index array again and again. If you also pass in the offset into the heightmap as a uniform, the vertex shader can do displacement mapping. If the displacement map is mipmapped, you get the advantages of trilinear filtering for distant maps. And, if the scenery is closer, rather than exposing that the you have a world made out of quads, you can use your transposable grid vertex array and indices to do vertex-shader interpolation (fancy splines) to do super-smooth infinite zoom? So I have some questions: does it work? In theory, in practice? does anyone do it? Does this technique have a name? Papers, demos, anything I can look at? does glVertexAttribDivisor mean that you can have a single glMultiDrawElementsEXT or similar approach to draw all your terrain tiles in one call rather than setting up the uniforms and emitting each tile? Would this offer any noticeable gains? does a heightmap that is GL_LUMINANCE take just one byte per pixel(=vertex)? (On mainstream cards, obviously. Does storage vary in practice?) Does going to the effort of reusing the same vertices and indices mean that you can basically fill the GPU RAM with heightmap and not a lot else, giving you either bigger landscapes or more detailed landscapes/meshes for the same bang? is mipmapping the displacement map going to work? On future cards? Is it going to introduce unsurmountable inaccuracies if it is enabled?

    Read the article

  • Shadow mapping with deffered shading for directional lights - shadow map projection problem

    - by Harry
    I'm trying to implement shadow mapping to my engine. I started with directional lights because they seemed to be the easiest one, but I was wrong :) I have implemented deferred shading and I retrieve position from depth. I think that there is the biggest problem but code looks ok for me. Now more about problem: Shadow map projected onto meshes looks bad scaled and translated and also some informations from shadow map texture aren't visible. You can see it on this screen: http://img5.imageshack.us/img5/2254/93dn.png Yelow frustum is light frustum and I have mixed shadow map preview and actual scene. As you can see shadows are in wrong place and shadow of cone and sphere aren't visible. Could you look at my codes and tell me where I have a mistake? // create shadow map if(!_shd)glGenTextures(1, &_shd); glBindTexture(GL_TEXTURE_2D, _shd); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 1024, 1024, 0, GL_DEPTH_COMPONENT, GL_FLOAT,NULL); // shadow map size glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, _shd, 0); glDrawBuffer(GL_NONE); // setting camera Vector dire=Vector(0,0,1); ACamera.setLookAt(dire,Vector(0)); ACamera.setPerspectiveView(60.0f,1,0.1f,10.0f); // currently needed for proper frustum corners calculation Vector min(ACamera._point[0]),max(ACamera._point[0]); for(int i=0;i<8;i++){ max=Max(max,ACamera._point[i]); min=Min(min,ACamera._point[i]); } ACamera.setOrthogonalView(min.x,max.x,min.y,max.y,-max.z,-min.z); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _s_buffer); // framebuffer for shadow map // rendering to depth buffer glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _g_buffer); Shaders["DirLight"].set(true); Matrix4 bias; bias.x.set(0.5,0.0,0.0,0.0); bias.y.set(0.0,0.5,0.0,0.0); bias.z.set(0.0,0.0,0.5,0.0); bias.w.set(0.5,0.5,0.5,1.0); Shaders["DirLight"].set("textureMatrix",ACamera.matrix*Projection3D*bias); // order of multiplications are 100% correct, everything gives mi the same result as using glm glActiveTexture(GL_TEXTURE5); glBindTexture(GL_TEXTURE_2D,_shd); lightDir(dir); // light calculations Vertex Shader makes nothing related to shadow calculatons Pixel shader function which calculates if pixel is in shadow or not: float readShadowMap(vec3 eyeDir) { // retrieve depth of pixel float z = texture2D(depth, gl_FragCoord.xy/screen).z; vec3 pos = vec3(gl_FragCoord.xy/screen, z); // transform by the projection and view inverse vec4 worldSpace = inverse(View)*inverse(ProjectionMatrix)*vec4(pos*2-1,1); worldSpace /= worldSpace.w; vec4 coord=textureMatrix*worldSpace; float vis=1.0f; if(texture2D(shadow, coord.xy).z < coord.z-0.001)vis=0.2f; return vis; } I also have question about shadows specifically for directional light. Currently I always look at 0,0,0 position and in further implementation I have to move light frustum along to camera frustum. I've found how to do this here: http://www.gamedev.net/topic/505893-orthographic-projection-for-shadow-mapping/ but it doesn't give me what I want. Maybe because of problems mentioned above, but I want know your opinion. EDIT: vec4 worldSpace is position read from depht of the scene (not shadow map). Maybe I wasn't precise so I'll try quick explain what is what: View is camera view matrix, ProjectionMatrix is camera projection,. First I try to get world space position from depth map and then multiply it by textureMatrix which is light view *light projection*bias. Rest of code is the same as in many tutorials. I can't use vertex shader to make something like gl_Position=textureMatrix*gl_Vertex and get it interpolated in fragment shader because of deffered rendering use so I want get it from depht buffer. EDIT2: I also tried make it as in Coding Labs tutorial about Shadow Mapping with Deferred Rendering but unfortunately this either works wrong.

    Read the article

  • First time shadow mapping problems

    - by user1294203
    I have implemented basic shadow mapping for the first time in OpenGL using shaders and I'm facing some problems. Below you can see an example of my rendered scene: The process of the shadow mapping I'm following is that I render the scene to the framebuffer using a View Matrix from the light point of view and the projection and model matrices used for normal rendering. In the second pass, I send the above MVP matrix from the light point of view to the vertex shader which transforms the position to light space. The fragment shader does the perspective divide and changes the position to texture coordinates. Here is my vertex shader, #version 150 core uniform mat4 ModelViewMatrix; uniform mat3 NormalMatrix; uniform mat4 MVPMatrix; uniform mat4 lightMVP; uniform float scale; in vec3 in_Position; in vec3 in_Normal; in vec2 in_TexCoord; smooth out vec3 pass_Normal; smooth out vec3 pass_Position; smooth out vec2 TexCoord; smooth out vec4 lightspace_Position; void main(void){ pass_Normal = NormalMatrix * in_Normal; pass_Position = (ModelViewMatrix * vec4(scale * in_Position, 1.0)).xyz; lightspace_Position = lightMVP * vec4(scale * in_Position, 1.0); TexCoord = in_TexCoord; gl_Position = MVPMatrix * vec4(scale * in_Position, 1.0); } And my fragment shader, #version 150 core struct Light{ vec3 direction; }; uniform Light light; uniform sampler2D inSampler; uniform sampler2D inShadowMap; smooth in vec3 pass_Normal; smooth in vec3 pass_Position; smooth in vec2 TexCoord; smooth in vec4 lightspace_Position; out vec4 out_Color; float CalcShadowFactor(vec4 lightspace_Position){ vec3 ProjectionCoords = lightspace_Position.xyz / lightspace_Position.w; vec2 UVCoords; UVCoords.x = 0.5 * ProjectionCoords.x + 0.5; UVCoords.y = 0.5 * ProjectionCoords.y + 0.5; float Depth = texture(inShadowMap, UVCoords).x; if(Depth < (ProjectionCoords.z + 0.001)) return 0.5; else return 1.0; } void main(void){ vec3 Normal = normalize(pass_Normal); vec3 light_Direction = -normalize(light.direction); vec3 camera_Direction = normalize(-pass_Position); vec3 half_vector = normalize(camera_Direction + light_Direction); float diffuse = max(0.2, dot(Normal, light_Direction)); vec3 temp_Color = diffuse * vec3(1.0); float specular = max( 0.0, dot( Normal, half_vector) ); float shadowFactor = CalcShadowFactor(lightspace_Position); if(diffuse != 0 && shadowFactor > 0.5){ float fspecular = pow(specular, 128.0); temp_Color += fspecular; } out_Color = vec4(shadowFactor * texture(inSampler, TexCoord).xyz * temp_Color, 1.0); } One of the problems is self shadowing as you can see in the picture, the crate has its own shadow cast on itself. What I have tried is enabling polygon offset (i.e. glEnable(POLYGON_OFFSET_FILL), glPolygonOffset(GLfloat, GLfloat) ) but it didn't change much. As you see in the fragment shader, I have put a static offset value of 0.001 but I have to change the value depending on the distance of the light to get more desirable effects , which not very handy. I also tried using front face culling when I render to the framebuffer, that didn't change much too. The other problem is that pixels outside the Light's view frustum get shaded. The only object that is supposed to be able to cast shadows is the crate. I guess I should pick more appropriate projection and view matrices, but I'm not sure how to do that. What are some common practices, should I pick an orthographic projection? From googling around a bit, I understand that these issues are not that trivial. Does anyone have any easy to implement solutions to these problems. Could you give me some additional tips? Please ask me if you need more information on my code. Here is a comparison with and without shadow mapping of a close-up of the crate. The self-shadowing is more visible.

    Read the article

  • Texture mapping on gluDisk

    - by Marnix
    I'm trying to map a brick texture on the edge of a fountain and I'm using gluDisk for that. How can I make the right coordinates for the disk? My code looks like this and I have only found a function that takes the texture along with the camera. I want the cubic texture to be alongside of the fountain, but gluDisk does a linear mapping. How do I get a circular mapping? void Fountain::Draw() { glPushMatrix(); // push 1 this->ApplyWorldMatrixGL(); glEnable(GL_TEXTURE_2D); // enable texturing glPushMatrix(); // push 2 glRotatef(90,-1,0,0); // rotate 90 for the quadric // also drawing more here... // stone texture glBindTexture(GL_TEXTURE_2D, texIDs[0]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glPushMatrix(); // push 3 glTranslatef(0,0,height); // spherical texture generation // this piece of code doesn't work as I intended glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); GLUquadric *tub = gluNewQuadric(); gluQuadricTexture(tub, GL_TRUE); gluDisk(tub, radius, outerR, nrVertices, nrVertices); gluDeleteQuadric(tub); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); glPopMatrix(); // pop 3 // more drawing here... glPopMatrix(); // pop 2 // more drawing here... glPopMatrix(); // pop 1 } To refine my question a bit. This is an image of what it is at default (left) and of what I want (right). The texture should fit in the border of the disk, a lot of times. If this is possible with the texture matrix, than that's fine with me as well.

    Read the article

  • Shadow mapping: what is the light looking at?

    - by PgrAm
    I'm all set to set up shadow mapping in my 3d engine but there is one thing I am struggling to understand. The scene needs to be rendered from the light's point of view so I simply first move my camera to the light's position but then I need to find out which direction the light is looking. Since its a point light its not shining in any particular direction. How do I figure out what the orientation for the light point of view is?

    Read the article

  • XNA 4.0 - Normal mapping shader - strange texture artifacts

    - by Taylor
    I recently started using custom shader. Shader can do diffuse and specular lighting and normal mapping. But normal mapping is causing really ugly artifacts (some sort of pixeling noise) for textures in greater distance. It looks like this: Image link This is HLSL code: // Matrix float4x4 World : World; float4x4 View : View; float4x4 Projection : Projection; //Textury texture2D ColorMap; sampler2D ColorMapSampler = sampler_state { Texture = <ColorMap>; MinFilter = Anisotropic; MagFilter = Linear; MipFilter = Linear; MaxAnisotropy = 16; }; texture2D NormalMap; sampler2D NormalMapSampler = sampler_state { Texture = <NormalMap>; MinFilter = Anisotropic; MagFilter = Linear; MipFilter = Linear; MaxAnisotropy = 16; }; // Light float4 AmbientColor : Color; float AmbientIntensity; float3 DiffuseDirection : LightPosition; float4 DiffuseColor : Color; float DiffuseIntensity; float4 SpecularColor : Color; float3 CameraPosition : CameraPosition; float Shininess; // The input for the VertexShader struct VertexShaderInput { float4 Position : POSITION0; float2 TexCoord : TEXCOORD0; float3 Normal : NORMAL0; float3 Binormal : BINORMAL0; float3 Tangent : TANGENT0; }; // The output from the vertex shader, used for later processing struct VertexShaderOutput { float4 Position : POSITION0; float2 TexCoord : TEXCOORD0; float3 View : TEXCOORD1; float3x3 WorldToTangentSpace : TEXCOORD2; }; // The VertexShader. VertexShaderOutput VertexShaderFunction(VertexShaderInput input, float3 Normal : NORMAL) { VertexShaderOutput output; float4 worldPosition = mul(input.Position, World); float4 viewPosition = mul(worldPosition, View); output.Position = mul(viewPosition, Projection); output.TexCoord = input.TexCoord; output.WorldToTangentSpace[0] = mul(normalize(input.Tangent), World); output.WorldToTangentSpace[1] = mul(normalize(input.Binormal), World); output.WorldToTangentSpace[2] = mul(normalize(input.Normal), World); output.View = normalize(float4(CameraPosition,1.0) - worldPosition); return output; } // The Pixel Shader float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 color = tex2D(ColorMapSampler, input.TexCoord); float3 normalMap = 2.0 *(tex2D(NormalMapSampler, input.TexCoord)) - 1.0; normalMap = normalize(mul(normalMap, input.WorldToTangentSpace)); float4 normal = float4(normalMap,1.0); float4 diffuse = saturate(dot(-DiffuseDirection,normal)); float4 reflect = normalize(2*diffuse*normal-float4(DiffuseDirection,1.0)); float4 specular = pow(saturate(dot(reflect,input.View)), Shininess); return color * AmbientColor * AmbientIntensity + color * DiffuseIntensity * DiffuseColor * diffuse + color * SpecularColor * specular; } // Techniques technique Lighting { pass Pass1 { VertexShader = compile vs_2_0 VertexShaderFunction(); PixelShader = compile ps_2_0 PixelShaderFunction(); } } Any advice? Thanks!

    Read the article

  • What exactly is UV and UVW Mapping?

    - by Michael Stum
    Trying to understand some basic 3D concepts, at the moment I'm trying to figure out how textures actually work. I know that UV and UVW mapping are techniques that map 2D Textures to 3D Objects - Wikipedia told me as much. I googled for explanations but only found tutorials that assumed that I already know what it is. From my understanding, each 3D Model is made out of Points, and several points create a face? Does each point or face have a secondary coordinate that maps to a x/y position in the 2D Texture? Or how does unwrapping manipulate the model? Also, what does the W in UVW really do, what does it offer over UV? As I understand it, W maps to the Z coordinate, but in what situation would I have different textures for the same X/Y and different Z, wouldn't the Z part be invisible? Or am I completely misunderstanding this?

    Read the article

  • Omni-directional shadow mapping

    - by gridzbi
    What is a good/the best way to fill a cube map with depth values that are going to give me the least amount of trouble with floating point imprecision? To get up and running I'm just writing the raw depth to the buffer, as you can imagine it's pretty terrible - I need to to improve it, but I'm not sure how. A few tutorials on directional lights divide the depth by W and store the Z/W value in the cube map - How would I perform the depth comparison in my shadow mapping step? The nvidia article here http://http.developer.nvidia.com/GPUGems/gpugems_ch12.html appears to do something completely different and use the dot of the light vector, presumably to counter the depth precision worsening over distance? He also scales the geometry so that it fits into the range -.5 +.5 - The article looks a bit dated, though - is this technique still reasonable? Shader code http://pastebin.com/kNBzX4xU Screenshot http://imgur.com/54wFI

    Read the article

  • multipass shadow mapping renderer in XNA

    - by Nick
    I am wanting to implement a multipass renderer in XNA (additive blending combines the contributions from each light). I have the renderer working without any shadows, but when I try to add shadow mapping support I run into an issue with switching render targets to draw the shadow maps. When I switch render targets, I lose the contents of the backbuffer which ruins the whole additive blending idea. For example: Draw() { DrawAmbientLighting() foreach (DirectionalLight) { DrawDirectionalShadowMap() // <-- I lose all previous lighting contributions when I switch to the shadow map render target here DrawDirectionalLighting() } } Is there any way around my issue? (I could render all the shadow maps first, but then I have to make and hold onto a render target for each light that casts a shadow--is this the only way?)

    Read the article

  • Sphere Texture Mapping shows visible seams

    - by AvengerDr
    As you can see from the above picture there is a visible seam in the texture mapping. The underlying mesh is a geosphere based on octahedron subdivisions. On that particular latitude, vertices have been duplicated. However there still is a visible seam. Here is how I calculate the UV coordinates: float longitude = (float)Math.Atan2(normal.X, -normal.Z); float latitude = (float)Math.Acos(normal.Y); float u = (float)(longitude / (Math.PI * 2.0) + 0.5); float v = (float)(latitude / Math.PI); Is this a problem in the coordinates or a mipmapping issue?

    Read the article

  • NHibernate mapping one table on two classes with where selection

    - by Rene Schulte
    We would like to map a single table on two classes with NHibernate. The mapping has to be dynamically depending on the value of a column. Here's a simple example to make it a bit clearer: We have a table called Person with the columns id, Name and Sex. The data from this table should be mapped either on the class Male or on the class Female depending on the value of the column Sex. In Pseudocode: create instance of Male with data from table Person where Person.Sex = 'm'; create instance of Female with data from table Person where Person.Sex = 'f'; The benefit is we have strongly typed domain models and can later avoid switch statements. Is this possible with NHibernate or do we have to map the Person table into a flat Person class first? Then afterwards we would have to use a custom factory method that takes a flat Person instance and returns a Female or Male instance. Would be good if NHibernate (or another library) can handle this.

    Read the article

  • JOGL hardware based shadow mapping - computing the texture matrix

    - by axel22
    I am implementing hardware shadow mapping as described here. I've rendered the scene successfully from the light POV, and loaded the depth buffer of the scene into a texture. This texture has correctly been loaded - I check this by rendering a small thumbnail, as you can see in the screenshot below, upper left corner. The depth of the scene appears to be correct - objects further away are darker, and that are closer to the light are lighter. However, I run into trouble while rendering the scene from the camera's point of view using the depth texture - the texture on the polygons in the scene is rendered in a weird, nondeterministic fashion, as shown in the screenshot. I believe I am making an error while computing the texture transformation matrix, but I am unsure where exactly. Since I have no matrix utilities in JOGL other then the gl[Load|Mult]Matrix procedures, I multiply the matrices using them, like this: void calcTextureMatrix() { glPushMatrix(); glLoadIdentity(); glLoadMatrixf(biasmatrix, 0); glMultMatrixf(lightprojmatrix, 0); glMultMatrixf(lightviewmatrix, 0); glGetFloatv(GL_MODELVIEW_MATRIX, shadowtexmatrix, 0); glPopMatrix(); } I obtained these matrices by using the glOrtho and gluLookAt procedures: glLoadIdentity() val wdt = width / 45 val hgt = height / 45 glOrtho(wdt, -wdt, -hgt, hgt, -45.0, 45.0) glGetFloatv(GL_MODELVIEW_MATRIX, lightprojmatrix, 0) glLoadIdentity() glu.gluLookAt( xlook + lightpos._1, ylook + lightpos._2, lightpos._3, xlook, ylook, 0.0f, 0.f, 0.f, 1.0f) glGetFloatv(GL_MODELVIEW_MATRIX, lightviewmatrix, 0) My bias matrix is: float[] biasmatrix = new float[16] { 0.5f, 0.f, 0.f, 0.f, 0.f, 0.5f, 0.f, 0.f, 0.f, 0.f, 0.5f, 0.f, 0.5f, 0.5f, 0.5f, 1.f } After applying the camera projection and view matrices, I do: glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR) glTexGenfv(GL_S, GL_EYE_PLANE, shadowtexmatrix, 0) glEnable(GL_TEXTURE_GEN_S) for each component. Does anybody know why the texture is not being rendered correctly? Thank you.

    Read the article

  • How to order a HasMany collection by a child property with Fluent NHibernate mapping

    - by Geoff Hardy
    I am using Fluent NHibernate to map the following classes: public abstract class DomainObject { public virtual int Id { get; protected internal set; } } public class Attribute { public virtual string Name { get; set; } } public class AttributeRule { public virtual Attribute Attribute { get; set; } public virtual Station Station { get; set; } public virtual RuleTypeId RuleTypeId { get; set; } } public class Station : DomainObject { public virtual IList<AttributeRule> AttributeRules { get; set; } public Station() { AttributeRules = new List<AttributeRule>(); } } My Fluent NHibernate mappings look like this: public class AttributeMap : ClassMap<Attribute> { public AttributeMap() { Id(o => o.Id); Map(o => o.Name); } } public class AttributeRuleMap : ClassMap<AttributeRule> { public AttributeRuleMap() { Id(o => o.Id); Map(o => o.RuleTypeId); References(o => o.Attribute).Fetch.Join(); References(o => o.Station); } } public class StationMap : ClassMap<Station> { public StationMap() { Id(o => o.Id); HasMany(o => o.AttributeRules).Inverse(); } } I would like to order the AttributeRules list on Station by the Attribute.Name property, but doing the following does not work: HasMany(o => o.AttributeRules).Inverse().OrderBy("Attribute.Name"); I have not found a way to do this yet in the mappings. I could create a IQuery or ICriteria to do this for me, but ideally I would just like to have the AttributeRules list sorted when I ask for it. Any advice on how to do this mapping?

    Read the article

  • OpenGL - Cascaded shadow mapping - Texture lookup

    - by Silverlan
    I'm trying to implement cascaded shadow mapping in my engine, but I'm somewhat stuck at the last step. For testing purposes I've made sure all cascades encompass my entire scene. The result is currently this: The different intensity of the cascades is not on purpose, it's actually the problem. This is how I do the texture lookup for the shadow maps inside the fragment shader: layout(std140) uniform CSM { vec4 csmFard; // far distances for each cascade mat4 csmVP[4]; // View-Projection Matrix int numCascades; // Number of cascades to use. In this example it's 4. }; uniform sampler2DArrayShadow csmTextureArray; // The 4 shadow maps in vec4 csmPos[4]; // Vertex position in shadow MVP space float GetShadowCoefficient() { int index = numCascades -1; vec4 shadowCoord; for(int i=0;i<numCascades;i++) { if(gl_FragCoord.z < csmFard[i]) { shadowCoord = csmPos[i]; index = i; break; } } shadowCoord.w = shadowCoord.z; shadowCoord.z = float(index); shadowCoord.x = shadowCoord.x *0.5f +0.5f; shadowCoord.y = shadowCoord.y *0.5f +0.5f; return shadow2DArray(csmTextureArray,shadowCoord).x; } I then use the return value and simply multiply it with the diffuse color. That explains the different intensity of the cascades, since I'm grabbing the depth value directly from the texture. I've tried to do a depth comparison instead, but with limited success: [...] // Same code as above shadowCoord.w = shadowCoord.z; shadowCoord.z = float(index); shadowCoord.x = shadowCoord.x *0.5f +0.5f; shadowCoord.y = shadowCoord.y *0.5f +0.5f; float z = shadow2DArray(csmTextureArray,shadowCoord).x; if(z < shadowCoord.w) return 0.25f; return 1.f; } While this does give me the same shadow value everywhere, it only works for the first cascade, all others are blank: (I colored the cascades because otherwise the transitions wouldn't be visible in this case) What am I missing here?

    Read the article

  • Fluent | Nhibernate multiple inheritance mapping?

    - by Broken Pipe
    I'm trying to map this classes: public interface IBusinessObject { Guid Id { get; set; } } public class Product { public virtual Guid Id { get; set; } public virtual int ProductTypeId { get; set; } } public class ProductWeSell : Product, IBusinessObject { } public class ProductWeDontSell : Product { } Using this Fluent mapping code: public class IBusinessObjectMap : ClassMap<IBusinessObject> { public IBusinessObjectMap() { Id(t => t.Id).GeneratedBy.Guid(); Table("BusinessObject"); } } public class ProductMap : ClassMap<Product> { public ProductMap() { Id(t => t.Id); DiscriminateSubClassesOnColumn("ProductTypeId", "null").Nullable(); } } public class ProductWeSellMap : SubclassMap<ProductWeSell> { public ProductWeSellMap() { DiscriminatorValue(1); KeyColumn("Id"); } } public class ProductWeDontSellMap : SubclassMap<ProductWeDontSell> { public ProductWeDontSellMap() { DiscriminatorValue(2); KeyColumn("Id"); } } But I get {"Duplicate class/entity mapping ProductWeSell"} error. And if we take a look at generated HBM, indeed it's duplicated, but i have no idea how to write this mapping without duplicating it if it's possible at all. Produced hbm: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <class xmlns="urn:nhibernate-mapping-2.2" name="IBusinessObject" table="BusinessObject"> <joined-subclass name="ProductWeSell" table="ProductWeSell"/> </class> </hibernate-mapping> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <class xmlns="urn:nhibernate-mapping-2.2" discriminator-value="null" name="Product" table="Product"> <discriminator type="String"> <column name="ProductTypeId" not-null="false" /> </discriminator> <subclass name="ProductWeDontSell" discriminator-value="2" /> <subclass name="ProductWeSell" discriminator-value="1" /> </class> </hibernate-mapping> So far I was unable to figure out how to map this using fluent Nhibernate (i haven't tried mapping this using hmb files). Any help appreciated Fluent or HBM files. The thing I'm trying to solve look identical to this topic: NHibernate inheritance mapping question

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >